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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2022-02-05

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This does not use modules though:
g++ -Wall class.hpp class.cpp main.cpp -o main


This just uses precompiled headers.
As shown by:
#pragma GCC pch_preprocess "class.hpp.gch"

This means the a is defined but not used.

See
https://gcc.gnu.org/onlinedocs/gcc-11.2.0/gcc/C_002b_002b-Modules.html#C_002b_002b-Modules
on how to use modules rather than precompiled headers.

Reply via email to