<br><br><div class="gmail_quote">Le 2 novembre 2011 14:01, Jan Engelhardt <span dir="ltr"><<a href="mailto:jengelh@medozas.de">jengelh@medozas.de</a>></span> a écrit :<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br>
On Wednesday 2011-11-02 04:51, Douglas Gregor wrote:<br>
>>      void *p = 0;<br>
>>      typeof((struct { typeof((struct { void *m; }){p}.m) n; }){0}.n) q = 0;<br>
><br>
</div><div class="im">>This code is relying on GCC extensions to treat a compound literal<br>
>as a constant expression, which C99 forbids.<br>
<br>
</div>I do not think this should have anything to do with constexprs, also<br>
because typeof does not really evaluate its argument, but just looks<br>
at the type system. Clang accepts a handful of - what looks to me<br>
like non-constant expressions - to typeof:<br>
<br>
        typeof((struct { void *m; }){p}.m) q = 0;<br>
<br>
        typeof(argc) argc2 = argc;<br>
<div class="im"><br>
>Feel free to file a bug; this might be the kind of thing that we can<br>
>support for GNU compatibility, if it falls out of the constexpr and<br>
>other C++11 work in this area.<br>
<br>
</div>I guess I did by writing to this list.<br>
<div><div></div><div class="h5"><br>
</div></div></blockquote></div><br>Hello Jan,<br><br>To file a bug you need to visit: <a href="http://llvm.org/bugs/">http://llvm.org/bugs/</a><br><br>On top of your description of the problem you are expected to provide a minimal example that reproduces the issue. If you cannot produce this minimal example, a preprocessed file can suffice (use -E to get the preprocessor output) however it might make investigation harder (and thus delay the correction).<br>
<br>--Matthieu<br>