gcc 3.4

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
df
Member
Member
Posts: 1076
Joined: Fri Oct 22, 2004 11:00 pm
Contact:

gcc 3.4

Post 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.
-- Stu --
Tim

Re:gcc 3.4

Post by Tim »

I assume these are changes to conform with the C and C++ standards. Is that right?
Curufir

Re:gcc 3.4

Post 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?
Chris Giese

Re:gcc 3.4

Post 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.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re:gcc 3.4

Post 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...
Every good solution is obvious once you've found it.
Post Reply