>joerg.schill...@fokus.fraunhofer.de (Joerg Schilling) writes: > >> The problem with GCC-4.4 is that it cannot be called ANSI C compliant. >> I did e.g. not jet find a way to prevent a warning for this line: >> >> (void)write(1, "Test" 4); >> >> which is 100% correct and even marks the return value as out of interest >> but this fact is ignored by gcc. > >I don't get any warning whatsoever: > >$ cat void-write.c >#include <unistd.h> > >int >main (void) >{ > write (1, "Test", 4); > (void) write (1, "Test", 4); > return 0; >} >$ gcc-4.4 -c -O2 -Wall void-write.c >$ > >Same with -ansi -pedantic. What options did you use to get a warning in >this case?
Perhaps he didn't use the comma between "Test" and "4"? Casper _______________________________________________ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/opensolaris-code