c++: Poor diagnostic in header-unit [PR 99468]

Nathan Sidwell nathan@acm.org
Mon Mar 8 18:39:42 GMT 2021


We didn't specifically check for a module-decl inside a	header unit.
  That leads to a confusing diagostic.  Fixed thusly.

         gcc/cp/
         * lex.c (module_token_filter::resume): Ignore module-decls inside
         header-unit.
         * parser.c (cp_parser_module_declaration): Reject in header-unit.
         gcc/testsuite/
         * g++.dg/modules/pr99468.H: New.
-- 
Nathan Sidwell
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr99468.diff
Type: text/x-patch
Size: 1543 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20210308/f9c01480/attachment.bin>


More information about the Gcc-patches mailing list