[cfe-commits] r154564 - /cfe/trunk/test/Sema/const-eval.c

John McCall rjmccall at apple.com
Wed Apr 11 19:31:49 PDT 2012


On Apr 11, 2012, at 7:26 PM, Richard Smith wrote:
> On Wed, Apr 11, 2012 at 7:06 PM, John McCall <rjmccall at apple.com> wrote:
> On Apr 11, 2012, at 4:32 PM, Eli Friedman wrote:
> > Author: efriedma
> > Date: Wed Apr 11 18:32:29 2012
> > New Revision: 154564
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=154564&view=rev
> > Log:
> > Add test for a construct we currently reject, constant-evaluating a load from a constant string.  Given that gcc doesn't accept this, we should continue to not accept it, even though it was accidentally supported by clang for a brief period.
> 
> Did I miss the discussion where we decided to stop supporting this?
> GCC is wrong;  it's pretty clearly a constant expression under the
> C++11 rules unless they've changed since the last time I looked.
> 
> We (and g++) accept it in C++11, but not in any other language. This seems to conform with all relevant standards, unless I've missed something.

Oh, I missed that this was a C test case;  apologies.

John.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120411/77e174c9/attachment.html>


More information about the cfe-commits mailing list