Page 1 of 1

gcc 3.4

Posted: Wed Dec 03, 2003 11:18 am
by df
Hmm changes in the wind for GCC 3.4....
(Really the only things to note.......)
The cast-as-lvalue extension has been removed for C++ and deprecated for C and Objective-C. In particular, code like this:

Code: Select all

   
   int i;
   (char) i = 5;
or this:

Code: Select all

   char *p;
   ((int *) p)++;

is no longer accepted for C++ and will not be accepted for C and Objective-C in a future version.

The conditional-expression-as-lvalue extension has been deprecated for C and Objective-C. In particular, code like this:

Code: Select all

   int a, b, c;
   (a ? b : c) = 2;
will not be accepted for C and Objective-C in a future version.

The compound-expression-as-lvalue extension has been deprecated for C and Objective-C. In particular, code like this:

Code: Select all

   int a, b;
   (a, b) = 2;
will not be accepted for C and Objective-C in a future version.

Re:gcc 3.4

Posted: Wed Dec 03, 2003 5:22 pm
by Tim
I assume these are changes to conform with the C and C++ standards. Is that right?

Re:gcc 3.4

Posted: Wed Dec 03, 2003 5:28 pm
by Curufir
The rumour mill has indicated that GCC 3.4 is broken in new and unusual ways. Has anyone pulled it off cvs and tried using it for something non-trivial?

Re:gcc 3.4

Posted: Wed Dec 03, 2003 10:40 pm
by Chris Giese
Brrrr... how will my endian macros work?

Code: Select all

/* these work for little-endian CPU only (e.g. x86) */
#define   read_le16(X)   (*(uint16_t *)(X))
#define   read_le32(X)   (*(uint32_t *)(X))
#define   write_le16(X,Y)   (*(uint16_t *)(X)) = (Y)
#define   write_le32(X,Y)   (*(uint32_t *)(X)) = (Y)
Thought I heard that GCC 3.4 would support pre-compiled headers, too. That'd be great for MinGW or CygWin. One reason those compilers are so slow is because WINDOWS.H is so huge.

Re:gcc 3.4

Posted: Thu Dec 04, 2003 1:28 am
by Solar
Affirmative on the precompiled headers.

I am also looking forward to the new C++ parser (handwritten instead of YACC generated). Perhaps this clears the path for proper export support in a future release. I'd really like to move my template definitions from the header files to the implementation files where they belong...