[cfe-dev] Spurious puzzling warning with --analyze
Robert Purves
listrp at gmail.com
Tue Aug 24 01:49:46 PDT 2010
$ cat test.c
void bar( int x ) { }
void foo( int n )
{
int x[4096], i;
for ( i = 0; i < (1 << n); i++ )
{
x[i] = i;
}
for ( i = 0; i < (1 << n); i++ )
{
bar( x[i] );
}
}
$ clang test.c --analyze
test.c:15:3: warning: Pass-by-value argument in function call is undefined
bar( x[i] );
^ ~~~~
$ clang --version
clang version 2.8 (trunk 111903)
Robert P.
More information about the cfe-dev
mailing list