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: Marc Glisse <marc dot glisse at inria dot fr>
- To: "Regan, Brian (EPC COE)" <brian dot regan at honeywell dot com>
- Cc: "'gcc-help at gcc dot gnu dot org'" <gcc-help at gcc dot gnu dot org>
- Date: Wed, 28 May 2014 20:42:39 +0200 (CEST)
- Subject: RE: help understanding behaviour of unsuffixed float constants
- Authentication-results: sourceware.org; auth=none
- 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>
- Reply-to: "'gcc-help at gcc dot gnu dot org'" <gcc-help at gcc dot gnu dot org>
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