public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/47539] New: Compile fail at "0x0E+" procedure
@ 2011-01-30  7:48 yaxi1984 at gmail dot com
  2011-01-30  7:57 ` [Bug c/47539] " pinskia at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: yaxi1984 at gmail dot com @ 2011-01-30  7:48 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: Compile fail at "0x0E+" procedure
           Product: gcc
           Version: 3.4.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: yaxi1984@gmail.com


The gcc will always compile fail on below lines:

/// file: fail.c
int main(void)
{
    int a = 0x0E+0x0C;
    return 0;
}

But, after add an "SPACE" after 0x0E, it will compile pass.

/// file: pass.c
int main(void)
{
    int a = 0x0E +0x0C;
    return 0;
}


This is always fail on gcc 3.4.4, the latest version is not verified yet.
Here is my build details:


D:\compiler\test_gcc_issue2>gcc -v
Reading specs from /usr/lib/gcc/i686-pc-cygwin/3.4.4/specs
Configured with: /usr/build/package/orig/test.respin/gcc-3.4.4-3/configure
--ver
bose --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib
--libe
xecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info
--enable-langu
ages=c,ada,c++,d,f77,pascal,java,objc --enable-nls --without-included-gettext
--
enable-version-specific-runtime-libs --without-x --enable-libgcj
--disable-java-
awt --with-system-zlib --enable-interpreter --disable-libgcj-debug
--enable-thre
ads=posix --enable-java-gc=boehm --disable-win32-registry
--enable-sjlj-exceptio
ns --enable-hash-synchronization --enable-libstdcxx-debug
Thread model: posix
gcc version 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)

D:\compiler\test_gcc_issue2>gcc fail.c
fail.c:3:10: invalid suffix "+0x0C" on integer constant

D:\compiler\test_gcc_issue2>gcc pass.c

D:\compiler\test_gcc_issue2>


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

* [Bug c/47539] Compile fail at "0x0E+" procedure
  2011-01-30  7:48 [Bug c/47539] New: Compile fail at "0x0E+" procedure yaxi1984 at gmail dot com
@ 2011-01-30  7:57 ` pinskia at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-01-30  7:57 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-01-30 02:47:56 UTC ---
This code is really invalid just as the error message says.  In fact the error
message says exactly why it is invalid.

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


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

end of thread, other threads:[~2011-01-30  2:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-30  7:48 [Bug c/47539] New: Compile fail at "0x0E+" procedure yaxi1984 at gmail dot com
2011-01-30  7:57 ` [Bug c/47539] " 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).