How to use pragma in a compound literal in GCC 9
Daurnimator
quae@daurnimator.com
Tue Feb 12 07:22:00 GMT 2019
A project I help maintain has had a report that it fails to compile with GCC 9
https://github.com/wahern/cqueues/issues/212#issuecomment-461693111
I've attached a minimal reproduction of the issue.
Trying to compile it results in:
<source>: In function 'main':
<source>:46:15: error: lvalue required as unary '&' operand
46 | void *x = &quietinit((struct bar){ 0, .a = 0 });
| ^
Compiler returned: 1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pragma-compound-literal.c
Type: text/x-csrc
Size: 1704 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20190212/f10d2275/attachment.bin>
More information about the Gcc
mailing list