This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/40517] New: strict-aliasing warning contains internal variable name


While compiling elfutils with gcc (GCC) 4.4.0 20090506 (Red Hat 4.4.0-4) I
found some const/aliasing issues that gcc pointed out as follows:

dwarf_getaranges.c: In function ?dwarf_getaranges?:
libdwP.h:540: error: dereferencing pointer ?readp.44? does break
strict-aliasing rules
dwarf_getaranges.c:152: note: initialized from here
libdwP.h:519: error: dereferencing pointer ?readp.44? does break
strict-aliasing rules
dwarf_getaranges.c:174: note: initialized from here

Note the .44 added to the variable name. Although it wasn't too hard to fix the
issues pointed out (the elfutils code in git has already been fixed up), the
warning message was somewhat confusing because of these internal names.

Unfortunately I wasn't able to come up with a really small example showing
this. So I'll attach the preprocessed -E code.

See also this elfutils mailinglist discussion:
https://fedorahosted.org/pipermail/elfutils-devel/2009-June/000368.html


-- 
           Summary: strict-aliasing warning contains internal variable name
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mark at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40517


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]