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

            Bug ID: 115705
           Summary: dubious macro definition ‘__attr_dealloc_fclose’
                    [-Winvalid-imported-macros]
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: devdude2 at hotmail dot com
  Target Milestone: ---

When I compile my code with c++ modules, I get this error, using gcc module
compiled headers, i.e. headers compiled like:
g++ -std=c++20 -fconcepts -fcoroutines -fmodules-ts -fmodule-header=system -x
c++-system-header random
I think cwchar and stdio define __attr_dealloc_fclose differently. Is this an
error and if so, can this be fixed, by making the definitions the same or
whatever?

Thanks

[build] /home/gm/projects/chess/src/libchess/libchess.cppm: warning:
inconsistent imported macro definition ‘__attr_dealloc_fclose’
[-Winvalid-imported-macros]
[build] In file included from
/home/gm/local/install-mygcc/include/c++/15.0.0/cwchar:44,
[build] of module /home/gm/local/install-mygcc/include/c++/15.0.0/cwchar,
imported at /home/gm/local/install-mygcc/include/c++/15.0.0/bits/postypes.h:40,
[build]         included from
/home/gm/local/install-mygcc/include/c++/15.0.0/bits/char_traits.h:42,
[build]                  from
/home/gm/local/install-mygcc/include/c++/15.0.0/string:42,
[build] of module /home/gm/local/install-mygcc/include/c++/15.0.0/string,
imported at /home/gm/projects/chess/src/libchess/libchess.cppm:3:
[build] /usr/include/wchar.h:713:11: note: ‘#define __attr_dealloc_fclose ’
[build]   713 | #  define __attr_dealloc_fclose /* empty */
[build]       |           ^~~~~~~~~~~~~~~~~~~~~
[build] In file included from
/home/gm/local/install-mygcc/include/c++/15.0.0/cstdio:42,
[build] of module /home/gm/local/install-mygcc/include/c++/15.0.0/cstdio,
imported at
/home/gm/local/install-mygcc/include/c++/15.0.0/ext/string_conversions.h:45,
[build]         included from
/home/gm/local/install-mygcc/include/c++/15.0.0/bits/basic_string.h:4154,
[build]                  from
/home/gm/local/install-mygcc/include/c++/15.0.0/string:54,
[build] of module /home/gm/local/install-mygcc/include/c++/15.0.0/string,
imported at /home/gm/projects/chess/src/libchess/libchess.cppm:3:
[build] /usr/include/stdio.h:187:9: note: ‘#define __attr_dealloc_fclose
__attr_dealloc (fclose, 1)’
[build]   187 | #define __attr_dealloc_fclose __attr_dealloc (fclose, 1)
[bu

Reply via email to