This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
RE: help understanding behaviour of unsuffixed float constants
- From: "Regan, Brian (EPC COE)" <brian dot regan at honeywell dot com>
- To: "'gcc-help at gcc dot gnu dot org'" <gcc-help at gcc dot gnu dot org>
- Date: Wed, 28 May 2014 18:43:44 +0000
- Subject: RE: help understanding behaviour of unsuffixed float constants
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=neutral (sender IP is 199.61.26.155) smtp dot mailfrom=brian dot regan at honeywell dot com;
- References: <61F2AE955326E042B27D898DD66AE04B33F0C890 at DE08EX3006 dot global dot ds dot honeywell dot com> <20140522192722 dot GL10386 at tucnak dot redhat dot com> <61F2AE955326E042B27D898DD66AE04B33F0C8C5 at DE08EX3006 dot global dot ds dot honeywell dot com> <20140522194623 dot GM10386 at tucnak dot redhat dot com> <61F2AE955326E042B27D898DD66AE04B33F0E815 at DE08EX3006 dot global dot ds dot honeywell dot com> <alpine dot DEB dot 2 dot 10 dot 1405282040100 dot 2275 at laptop-mg dot saclay dot inria dot fr>
Which ANSI section does that violate?
-----Original Message-----
From: Marc Glisse [mailto:marc.glisse@inria.fr]
Sent: Wednesday, May 28, 2014 2:43 PM
To: Regan, Brian (EPC COE)
Cc: 'gcc-help@gcc.gnu.org'
Subject: RE: help understanding behaviour of unsuffixed float constants
On Wed, 28 May 2014, Regan, Brian (EPC COE) wrote:
> It might have been clearer if I included the objdump disassembly:
>
> It should be apparent below the difference when I force the unsuffixed
> float to double (big value) and the second case where I have a
> second(but smaller) unsuffixed double. Based on the ASNI item
> highlighted in the original email (6.1.3.1 "An unsuffixed floating
> constant has type double.") this difference is unexpected. The concern
> is not a technical one - it is one of understanding and documenting
> the deviation from the ANSI standard.
Then you may also want to document that the compiler sometimes replaces
1+1 by 2 (objdump won't show you any addition).
--
Marc Glisse