This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Bug c++/12615] [3.3 Regression] initializer syntax for PAD structs gives parse error


"Joseph S. Myers" <jsm@polyomino.org.uk> writes:

| On Tue, 14 Oct 2003, gdr at integrable-solutions dot net wrote:
| 
| >   object vorg = (object) { one_o: 0, allocstamp: 0 };
| > 
| > while valid C99, is invalid C++.
| 
| There are two extensions to C++ in play here:
| 
| * Compound literals (documented as supported as an extension in C++).

FWIW, there is a proposal to add generalized initializer list to C++,
that in limits will support C99 compound literals (but without
designated initializers)

  http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1509.pdf

| * Designated initializers, documented as unimplemented in GNU C++.  This 
| example in fact uses the obsolete GNU syntax rather than the standard C99 
| one.  I'd like to deprecate that obsolete syntax properly

I second the deprecation initiative.

-- Gaby


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]