public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgcc/109289] New: Conflicting types for built-in functions in libgcc/emutls.c
@ 2023-03-26 22:58 jdx at o2 dot pl
  2023-03-27  0:14 ` [Bug libgcc/109289] " pinskia at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: jdx at o2 dot pl @ 2023-03-26 22:58 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 109289
           Summary: Conflicting types for built-in functions in
                    libgcc/emutls.c
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libgcc
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jdx at o2 dot pl
  Target Milestone: ---

Created attachment 54759
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54759&action=edit
Proposed patch

For different hosts (Windows/MSYS2, Linux), different targets and for every
libgcc variant, the following messages are reported:

/d/Works/xcomp/gcc-build/./gcc/xgcc -B/d/Works/xcomp/gcc-build/./gcc/
-B/usr/local/h8300-elf/bin/ -B/usr/local/h8300-elf/lib/ -isystem
/usr/local/h8300-elf/include -isystem /usr/local/h8300-elf/sys-include   
-isystem /d/Works/xcomp/sysroot/h8300-elf/include -ms -O2  -isystem
/d/Works/xcomp/sysroot/h8300-elf/include -DIN_GCC -fPIC
-DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition 
-isystem ./include  -DDF=SF -g -DIN_LIBGCC2 -fbuilding-libgcc
-fno-stack-protector -Dinhibit_libc -DDF=SF -I. -I. -I../../.././gcc
-I../../../../../gcc/libgcc -I../../../../../gcc/libgcc/.
-I../../../../../gcc/libgcc/../gcc -I../../../../../gcc/libgcc/../include    
-o emutls.o -MT emutls.o -MD -MP -MF emutls.dep -fexceptions -c
../../../../../gcc/libgcc/emutls.c -fvisibility=hidden -DHIDE_EXPORTS
d:\works\gcc\libgcc\emutls.c:61:7: warning: conflicting types for built-in
function '__emutls_get_address'; expected 'void *(void *)'
[-Wbuiltin-declaration-mismatch]
   61 | void *__emutls_get_address (struct __emutls_object *);
      |       ^~~~~~~~~~~~~~~~~~~~
d:\works\gcc\libgcc\emutls.c:63:6: warning: conflicting types for built-in
function '__emutls_register_common'; expected 'void(void *, long unsigned int, 
long unsigned int,  void *)' [-Wbuiltin-declaration-mismatch]
   63 | void __emutls_register_common (struct __emutls_object *, word, word,
void *);
      |      ^~~~~~~~~~~~~~~~~~~~~~~~
d:\works\gcc\libgcc\emutls.c:140:1: warning: conflicting types for built-in
function '__emutls_get_address'; expected 'void *(void *)'
[-Wbuiltin-declaration-mismatch]
  140 | __emutls_get_address (struct __emutls_object *obj)
      | ^~~~~~~~~~~~~~~~~~~~
d:\works\gcc\libgcc\emutls.c:204:1: warning: conflicting types for built-in
function '__emutls_register_common'; expected 'void(void *, long unsigned int, 
long unsigned int,  void *)' [-Wbuiltin-declaration-mismatch]
  204 | __emutls_register_common (struct __emutls_object *obj,
      | ^~~~~~~~~~~~~~~~~~~~~~~~


Judging by the comment on line 138 the problem is known and acceptable,
therefore IMO it would be nice to mute the warnings by wrapping
declarations/definitions of these functions with "#pragma GCC diagnostic" e.g.
as shown in the attached patch.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-12-06 12:53 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-26 22:58 [Bug libgcc/109289] New: Conflicting types for built-in functions in libgcc/emutls.c jdx at o2 dot pl
2023-03-27  0:14 ` [Bug libgcc/109289] " pinskia at gcc dot gnu.org
2023-12-01  9:53 ` tschwinge at gcc dot gnu.org
2023-12-01 10:17 ` fw at gcc dot gnu.org
2023-12-02 12:24 ` fw at gcc dot gnu.org
2023-12-02 23:00 ` pinskia at gcc dot gnu.org
2023-12-03  4:09 ` jdx at o2 dot pl
2023-12-05 16:41 ` tschwinge at gcc dot gnu.org
2023-12-06 11:03 ` tschwinge at gcc dot gnu.org
2023-12-06 11:27 ` cvs-commit at gcc dot gnu.org
2023-12-06 12:53 ` tschwinge at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).