This is the mail archive of the gcc-patches@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: [PATCH] Fix PR c++/30759: Initializer-list accepted for object of non-POD type


Gabriel Dos Reis wrote:

> modulo the spelling of the flag as flag_cxx98 instead of flag_cpp98, the patch
> if fine.  Many thanks!

I don't think adding a new flag is such a good idea, especially since
it's setting is not independent of flag_cxx0x.

For better future-proofing, we should introduce an enum:

  enum cxx_dialect {
    cxx98,
    cxx0x
  };

and then replace flag_cxx0x with:

  enum cxx_dialect dialect;

Then, we can test "dialect != cxx98" and "dialect == cxx0x" as appropriate.

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


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