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/21438] New: Warning about division by zero depends on lexical form


GCC is supposed to suppress division by zero warnings when floating point. 
However the warning is based on the lexical form, i.e. the unpromoted type.  I
suggest it should depend on the promoted type.

float f[] = {
 1.0f/0.0f,  // No warning
 1.0f/0      // Warning (and diagnostic is on the wrong line in 3.3 at least)
};

-- 
           Summary: Warning about division by zero depends on lexical form
           Product: gcc
           Version: 3.3.3
            Status: UNCONFIRMED
          Severity: minor
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: neil at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


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