https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97991

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |pinskia at gcc dot 
gnu.org

--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Even simplified testcase:
```
#pragma message _Pragma ("pack(bar)")
```

That is it happens with pack (on some targets), redefine_extname and message
pragma which does expansion inside the pragma

That is:
c-family/c-pragma.cc:  c_register_pragma_with_expansion (0, "pack",
handle_pragma_pack);
c-family/c-pragma.cc:  c_register_pragma_with_expansion (0, "redefine_extname",
c-family/c-pragma.cc:  c_register_pragma_with_expansion (0, "message",
handle_pragma_message);
config/sol2-c.cc:  c_register_pragma_with_expansion (0, "align",
solaris_pragma_align);
config/vms/vms-c.cc:  c_register_pragma_with_expansion (NULL,
"__nomember_alignment",
config/vms/vms-c.cc:  c_register_pragma_with_expansion (NULL,
"nomember_alignment",


The assert was added with r0-72806-gbc4071dd66fd4d (which I think caused it).

I think I have a simple fix. the assert should just be changed to allow
CPP_PRAGMA when inside a in_pragma (which is like what the C++ front-end does).

Note the preprocessed source is wrong too but it is wrong for C++ already. 
I will try to fix that tomorrow.

Reply via email to