public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/33547]  New: invalid suffix "+0x23" on integer constant
@ 2007-09-24 20:03 j at uriah dot heep dot sax dot de
  2007-09-24 21:13 ` [Bug preprocessor/33547] " schwab at suse dot de
  2010-08-04 16:41 ` schwab at linux-m68k dot org
  0 siblings, 2 replies; 4+ messages in thread
From: j at uriah dot heep dot sax dot de @ 2007-09-24 20:03 UTC (permalink / raw)
  To: gcc-bugs

Compiling the following simple snippet:

void foo(void)
{
        int i = 0x4E+0x23;
}

triggers the error message indicated in the summary.

Analysis of the problem shows that the macro VALID_SIGN() used inside
lex_number() (libcpp/lex.c) misidentifiex the plus sign following the
E (possible exponent) character as still being part of the number, even
though this is impossible since the number started with 0x, so the
exponent is required to be introduced with `p' or `P'.

IMHO, the number parser needs to detect the possible 0x prefix early,
and pass this information down to VALID_SIGN() so this macro can
definately decide whether either of `p' or `e' is the valid exponent
character within the current context.


-- 
           Summary: invalid suffix "+0x23" on integer constant
           Product: gcc
           Version: 4.1.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: preprocessor
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: j at uriah dot heep dot sax dot de


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


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

* [Bug preprocessor/33547] invalid suffix "+0x23" on integer constant
  2007-09-24 20:03 [Bug preprocessor/33547] New: invalid suffix "+0x23" on integer constant j at uriah dot heep dot sax dot de
@ 2007-09-24 21:13 ` schwab at suse dot de
  2010-08-04 16:41 ` schwab at linux-m68k dot org
  1 sibling, 0 replies; 4+ messages in thread
From: schwab at suse dot de @ 2007-09-24 21:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from schwab at suse dot de  2007-09-24 21:13 -------
0x4E+0x23 is a single preprocessing number.  If that cannot be turned into a
valid token then the program is malformed.  Put in some space.


-- 

schwab at suse dot de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


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


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

* [Bug preprocessor/33547] invalid suffix "+0x23" on integer constant
  2007-09-24 20:03 [Bug preprocessor/33547] New: invalid suffix "+0x23" on integer constant j at uriah dot heep dot sax dot de
  2007-09-24 21:13 ` [Bug preprocessor/33547] " schwab at suse dot de
@ 2010-08-04 16:41 ` schwab at linux-m68k dot org
  1 sibling, 0 replies; 4+ messages in thread
From: schwab at linux-m68k dot org @ 2010-08-04 16:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from schwab at linux-m68k dot org  2010-08-04 16:40 -------
*** Bug 45184 has been marked as a duplicate of this bug. ***


-- 

schwab at linux-m68k dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |altmer at arts-union dot ru


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


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

* [Bug preprocessor/33547] invalid suffix "+0x23" on integer constant
       [not found] <bug-33547-4@http.gcc.gnu.org/bugzilla/>
@ 2022-06-20 20:31 ` pinskia at gcc dot gnu.org
  0 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-06-20 20:31 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|INVALID                     |DUPLICATE

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Dup of bug 3885.

*** This bug has been marked as a duplicate of bug 3885 ***

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

end of thread, other threads:[~2022-06-20 20:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-24 20:03 [Bug preprocessor/33547] New: invalid suffix "+0x23" on integer constant j at uriah dot heep dot sax dot de
2007-09-24 21:13 ` [Bug preprocessor/33547] " schwab at suse dot de
2010-08-04 16:41 ` schwab at linux-m68k dot org
     [not found] <bug-33547-4@http.gcc.gnu.org/bugzilla/>
2022-06-20 20:31 ` pinskia 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).