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

[Bug preprocessor/63337] Hexadecimal exponent: improvements to error message


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63337

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kargl at gcc dot gnu.org

--- Comment #2 from kargl at gcc dot gnu.org ---
(In reply to dmalcolm from comment #0)
> As discussed in the thread here:
>   https://gcc.gnu.org/ml/gcc/2014-09/msg00282.html
> if the user mistakenly tries to use the "e" suffix for a exponent marker
> with a hexadecimal constant, the warning could be improved.
> 
> $ cat /tmp/foo.c
> float f = 0x3ffe+63;

Except the user (that would be me) wasn't using e as an exponent
marker.  The user was adding two int values as in

int i;
i = 0x3ffe+63;  /* Except for an oddity of C, this is 16383+63 */

-- 
steve


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