Hello folks,
can you please test the following piece of code with your compilers
and check if they're issuing any warnings? Thanks!
#include
On Thu, 12 Feb 2004, Gustavo Niemeyer wrote:
Hello folks,
can you please test the following piece of code with your compilers and check if they're issuing any warnings? Thanks!
#include
int main(int argc, char *argv[]) { char c = 1; if (!(c & ~255)) printf("Thanks!\n"); return 0; }
OK UnixWare 7.1.3 Optimizing C Compilation System (CCS) 4.1 10/31/02 (OU7.1.3bl11.1 OK UnixWare 2.03 Optimizing C Compilation System (CCS) 3.0 02/14/95 (e10) OK SCO OpenServer 3 Native cc and gcc 2.7.2.3 OK SCO OpenServer 5.0.4 SCO UNIX Development System Release 5.1.0Ha 25Apr97 OK UnixWare 7.1.1 Optimizing C Compilation System (CCS) 3.2 09/28/99 (santamariasbl 5.1.rs1ubl7) OK Caldera OpenLinux 3.1.1 gcc 2.95.2 OK SCO OpenServer 5.0.7 SCO UNIX Development System Release 5.2.0A 22Jul03 gcc 2.95.3 OK Solaris 7 gcc 2.95.2 -- Tim Rice Multitalents tim@multitalents.net
Gustavo Niemeyer wrote:
can you please test the following piece of code with your compilers and check if they're issuing any warnings? Thanks!
#include
int main(int argc, char *argv[]) { char c = 1; if (!(c & ~255)) printf("Thanks!\n"); return 0; }
No warning at Linux 2.4.22 gcc 3.3.2 glibc 2.3.2. Gerrit. -- Weather in Twenthe, Netherlands 12/02 19:25 UTC: 5.0°C wind 2.2 m/s SW (57 m above NAP) -- Asperger's Syndrome - a personal approach: http://people.nl.linux.org/~gerrit/english/
Gustavo Niemeyer wrote:
Hello folks,
can you please test the following piece of code with your compilers and check if they're issuing any warnings? Thanks!
#include
int main(int argc, char *argv[]) { char c = 1; if (!(c & ~255)) printf("Thanks!\n"); return 0; }
On OS X 10.3.2 (Panther) which uses "gcc version 3.3 20030304 (Apple Computer, Inc. build 1495)" I compile with no warnings and it spits out "Thanks!". -Brett
participants (4)
-
Brett C.
-
Gerrit
-
Gustavo Niemeyer
-
Tim Rice