g++ missing warning

nbecker@fred.net nbecker@fred.net
Thu Sep 28 12:03:00 GMT 2000


On gcc-2.95.2

gcc warns, but g++ doesn't, on this code:

int f (int a, int b, int c) {
  if (a >= b == c)
    return 0;
  else
    return 1;
}

gcc -c -Wall -W Test.c
Test.c: In function `f':
Test.c:2: warning: comparisons like X<=Y<=Z do not have their mathematical meaning

g++ -c -Wall -W Test.c
[nothing]



More information about the Gcc mailing list