[Issue 22598] importC: Add support for __extension__ keyword

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Feb 3 04:18:00 UTC 2022


https://issues.dlang.org/show_bug.cgi?id=22598

--- Comment #6 from dave287091 at gmail.com ---
(In reply to Walter Bright from comment #5)
> Once the `__extension__({ ... })` is parsed, what should the compiler do
> with it?

There’s two things going on in that example: the __extension__ just suppresses
some warning when it immediately precedes an expression.
https://gcc.gnu.org/onlinedocs/gcc/Alternate-Keywords.html#index-_005f_005fextension_005f_005f

In addition, there is a statement expression, which is a different gnu
extension. That’s the statements wrapped by ({...}).

So the compiler could just ignore __extension__ as it does nothing but suppress
warnings. Supporting gnu statement expressions is a different issue and is more
difficult.

--


More information about the Digitalmars-d-bugs mailing list