[Bug c/67759] [4.9 only] Missing warning "makes pointer from integer without a cast" after multiline assert

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jan 14 05:04:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67759

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
apinski@arm64:~/src/local/gcc/objdir/gcc$ gcc -W -Wall t9.c -S -save-temps
t9.c: In function ‘should_warn’:
t9.c:18:6: warning: passing argument 1 of ‘get’ makes pointer from integer
without a cast [-Wint-conversion]
  get(1);
      ^

t9.c:10:7: note: expected ‘void *’ but argument is of type ‘int’
 void *get(void *con)
       ^~~

apinski@arm64:~/src/local/gcc/objdir/gcc$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/home/apinski/local-gcc/libexec/gcc/aarch64-unknown-linux-gnu/6.0.0/lto-wrapper
Target: aarch64-unknown-linux-gnu
Configured with: /home/apinski/src/local/gcc/configure
--prefix=/home/apinski/local-gcc --enable-languages=c,c++,fortran
--disable-sanitizer --with-cpu=thunderx+lse
Thread model: posix
gcc version 6.0.0 20160109 (experimental) [trunk revision 232185] (GCC)


More information about the Gcc-bugs mailing list