This is the mail archive of the
mailing list for the GCC project.
- From: Micah Nathan Moore <moore_mn at cobra dot cs dot mercer dot edu>
- To: gcc at gnu dot org
- Cc: moore_mn at cobra dot cs dot mercer dot edu (Micah Nathan Moore)
- Date: Sun, 4 Aug 2002 20:50:40 -0400 (EDT)
- Subject: wierdness
* * Nathan Moore
* * email@example.com
* * The following code compiles error-free with G++ 3.1.1,
* * however, it does not do what I expected it to do.
* * It seems to me that the source code may not be correct
* * C++ (or G++), but what the compiler produces is not
* * what anyone could intend this code to do.
* * At the very least, errors should be produced.
* * */
extern "C" int printf(const char *, ...);
const char * z = "%i %i %i\n";
const int first = 1,
second = 2,
third = 3,
fourth = 4;
int A = 8;
int B = 8;
( A >? B ) = first ;
int X = 9;
int Y = 8;
(X >? Y) = second;
int M = 7;
int N = 7;
((M>N) ? M : N) = fourth;