public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/21438] New: Warning about division by zero depends on lexical form
@ 2005-05-07  8:09 neil at gcc dot gnu dot org
  2005-05-07 18:18 ` [Bug c/21438] " pinskia at gcc dot gnu dot org
  2005-05-07 18:20 ` pinskia at gcc dot gnu dot org
  0 siblings, 2 replies; 8+ messages in thread
From: neil at gcc dot gnu dot org @ 2005-05-07  8:09 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 8+ messages in thread
[parent not found: <bug-21438-6@http.gcc.gnu.org/bugzilla/>]
[parent not found: <bug-21438-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2021-09-28  8:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-07  8:09 [Bug c/21438] New: Warning about division by zero depends on lexical form neil at gcc dot gnu dot org
2005-05-07 18:18 ` [Bug c/21438] " pinskia at gcc dot gnu dot org
2005-05-07 18:20 ` pinskia at gcc dot gnu dot org
     [not found] <bug-21438-6@http.gcc.gnu.org/bugzilla/>
2007-01-16  0:57 ` patchapp at dberlin dot org
2007-03-12  1:32 ` patchapp at dberlin dot org
2007-03-14 18:38 ` manu at gcc dot gnu dot org
2007-03-14 18:39 ` manu at gcc dot gnu dot org
     [not found] <bug-21438-4@http.gcc.gnu.org/bugzilla/>
2021-09-28  8:25 ` pinskia 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).