public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/56397] New: Floating Point constant in C, with standard C99
@ 2013-02-19 14:37 argentinator.gcc.questions at outlook dot com
  2013-02-19 15:13 ` [Bug c/56397] " redi at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: argentinator.gcc.questions at outlook dot com @ 2013-02-19 14:37 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 56397
           Summary: Floating Point constant in C, with standard C99
    Classification: Unclassified
           Product: gcc
           Version: 4.6.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: argentinator.gcc.questions@outlook.com


Created attachment 29496
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29496
Source code, ".i" file, and compiler output in a ".txt" file.

I think that the compiler doesn't recognize properly the type of the
floating-point constants for the standard C99.
A straight example is the simple sentence: 

(1.1F & 1);

In this case, 1.1F should be considered as a 'float' constant,
but the compiler triggers this error message:

error: invalid operands to binary & (have 'long double' and 'int')

Thus, the compiler considers that 1.1F has type 'long double', but 'float' is
expected.

I am running GCC 4.6.1 with MinGW, under a Windows 7 system.
In my system, FLT_EVAL_METHOD == 2, but I think that this is not the problem,
and that we have actually some kind of compiler bug.

The source code is just this:

---------------------------------------------------
int main(void) {
  1.1F & 1;
}


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-02-20  9:33 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-19 14:37 [Bug c/56397] New: Floating Point constant in C, with standard C99 argentinator.gcc.questions at outlook dot com
2013-02-19 15:13 ` [Bug c/56397] " redi at gcc dot gnu.org
2013-02-19 16:57 ` argentinator.gcc.questions at outlook dot com
2013-02-19 17:10 ` redi at gcc dot gnu.org
2013-02-19 17:11 ` joseph at codesourcery dot com
2013-02-19 18:58 ` argentinator.gcc.questions at outlook dot com
2013-02-19 21:52 ` joseph at codesourcery dot com
2013-02-19 22:02 ` argentinator.gcc.questions at outlook dot com
2013-02-20  9:33 ` rguenth 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).