This is the mail archive of the gcc-prs@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]

c++/7804: bad printing of fp constant in warning message


>Number:         7804
>Category:       c++
>Synopsis:       bad printing of fp constant in warning message
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Sep 01 20:56:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Richard Henderson
>Release:        3.2 and 3.3
>Organization:
>Environment:
i686-linux
>Description:
z.cc:5: warning: division by zero in `
   0x00000000000000000080ff3f0000000000000000 / 0.'
z.cc:6: warning: division by zero in `
   0000000000000000000000000000000000000000 / 0.'
>How-To-Repeat:
        extern "C" int printf(const char *, ...);

        struct S
        {
          static const float inf = 1.0f / 0.0f;
          static const float nan = 0.0f / 0.0f;
        };

        int main()
        {
          printf("%f\n%f\n", S::inf, S::nan);
          return 0;
        }
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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