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 lto/51744] New: Erroneous warning: memset used with constant zero length parameter


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

             Bug #: 51744
           Summary: Erroneous warning: memset used with constant zero
                    length parameter
    Classification: Unclassified
           Product: gcc
           Version: 4.6.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: richardn26@gmail.com


Created attachment 26233
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26233
concatated ma2.i and ma2_test.i from -save-temps ma2.c and ma2_test.c

Attached code gives erroneous warning when compiled with -
gcc -O3 -flto -Wall -Wextra -D_FORTIFY_SOURCE=2 -c ma2.c
gcc -O3 -flto -Wall -Wextra -D_FORTIFY_SOURCE=2 -c ma2_test.c
gcc -O3 -flto -Wall -Wextra -D_FORTIFY_SOURCE=2 -o ma2_test ma2_test.o ma2.o
ma2.o (symbol from plugin): warning: memset used with constant zero length
parameter; this could be due to transposed parameters

Compiling without -flto or without -D_FORTIFY_SOURCE=2 does not give warning.
Generated code seems to work ok anyway.


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