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/39748] New: possible bogus offset warning


I just tried to compile the popular bzip2 package
with the GNU gcc version 4.5 snapshot 20090409.

The compiler said

bzlib.c: In function 'bzopen_or_bzdopen':
bzlib.c:1443: warning: offset '2' outside bounds of constant string
bzlib.c:1443: warning: offset '3' outside bounds of constant string

The source code is

     if (path==NULL || strcmp(path,"")==0) {

This looks like a bogus warning to me.

Preprocessed source code attached. No special flags required.


-- 
           Summary: possible bogus offset warning
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dcb314 at hotmail dot com
  GCC host triplet: x86_64-suse-linux


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


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