--- Comment #6 from rguenth at gcc dot gnu dot org 2006-02-21 10:09 ---
You want to avoid spelling the useless name? Use the preprocessor. Also using
a union will prevent a lot of compiler optimization from happening as you are
making alias analysis harder.
As this is never going to h
--- Comment #5 from pinskia at gcc dot gnu dot org 2006-02-20 02:10 ---
GCC now has theories about extensions, dont' add them.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26370
--- Comment #4 from acahalan at gmail dot com 2006-02-19 23:20 ---
Here is an example of something that is seriously awkward to do in C.
Suppose I want to ensure that several variables end up in the same cache line.
I'd like to do it this way:
struct {
short s1;
short s2;
unsigne
--- Comment #3 from acahalan at gmail dot com 2006-02-19 23:09 ---
Here is an example of something that fundamentally can not be done in plain C.
Suppose I have a large project with a badly-named global variable. When I
compile with -Wshadow, I get lots of complaints. I'd like to rename
--- Comment #2 from acahalan at gmail dot com 2006-02-19 23:02 ---
Given that we have anon unions, and given that unions can exist at top level
and function level, this is a very logical extension. It lifts an annoying and
arbitrary restriction.
>From the user's point of view, this does
--- Comment #1 from falk at debian dot org 2006-02-19 22:02 ---
In the past, it has been de-facto gcc policy to add only language extensions
that do something that fundamentally cannot be done in ISO C. So it would be
quite unlikely that this would be accepted. In addition to that, I thi