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: [C++ PATCH] C++0x static assertions


Gabriel Dos Reis wrote:
> Mark Mitchell <mark@codesourcery.com> writes:
> 
> [...]
> 
> | and they don't have many of the normal declaration properties.  For
> | example, they don't have names -- which is perhaps *the* fundamental
> | property of a declaration.  So, I would create a tcc_exceptional node
> | for these. 
> 
> Indeed.  I pointed out that irregularity four years ago, but the
> committee didn't not think it was disturbing enough, just like
> asm-declarations :-(
> 
> Would an expression node be a better choice?

You can't use them as expressions, as I understand it.  For example:

  f(static_assert<true, "false?!?">)

is invalid.  So, I think it's best to make them exceptional.

-- 
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]