Bug 23697 - 0b... Ansi C integer description missing
Summary: 0b... Ansi C integer description missing
Status: RESOLVED DUPLICATE of bug 23479
Alias: None
Product: gcc
Classification: Unclassified
Component: c (show other bugs)
Version: 3.4.4
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: rejects-valid
Depends on:
Blocks:
 
Reported: 2005-09-02 15:27 UTC by baptiste fouques
Modified: 2005-09-03 18:20 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
A short demonstration of what is missing (55 bytes, text/plain)
2005-09-02 15:30 UTC, baptiste fouques
Details

Note You need to log in before you can comment on or make changes to this bug.
Description baptiste fouques 2005-09-02 15:27:23 UTC
gcc does not accept an integer described with its binary format
short zero = 0b00000000000000;
though it is a ansi requierement ... and hex. is working well (int zero =
0x00000000;)

Thanks
Comment 1 baptiste fouques 2005-09-02 15:30:16 UTC
Created attachment 9651 [details]
A short demonstration of what is missing

gcc -v -save-temps g_ansi.c
Reading specs from /usr/lib/gcc/i686-pc-cygwin/3.4.4/specs
Configured with: /gcc/gcc-3.4.4/gcc-3.4.4-1/configure --verbose --prefix=/usr
--exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib --libexecdir=/usr/lib
--mandir=/usr/share/man --infodir=/usr/share/info
--enable-languages=c,ada,c++,d,f77,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-threads=posix --enable-java-gc=boehm
--disable-win32-registry --enable-sjlj-exceptions --enable-hash-synchronization
--enable-libstdcxx-debug : (reconfigured) 
Thread model: posix
gcc version 3.4.4 (cygming special) (gdc 0.12, using dmd 0.125)
 /usr/lib/gcc/i686-pc-cygwin/3.4.4/cc1.exe -E -quiet -v -D__CYGWIN32__
-D__CYGWIN__ -Dunix -D__unix__ -D__unix -idirafter
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api -idirafter
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/lib/../../include/w32api
g_ansi.c -mtune=pentiumpro -o g_ansi.i
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory
"/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/include"
ignoring duplicate directory
"/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/lib/../../include/w32api"

#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc/i686-pc-cygwin/3.4.4/include
 /usr/include
 /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api
End of search list.
 /usr/lib/gcc/i686-pc-cygwin/3.4.4/cc1.exe -fpreprocessed g_ansi.i -quiet
-dumpbase g_ansi.c -mtune=pentiumpro -auxbase g_ansi -version -o g_ansi.s
GNU C version 3.4.4 (cygming special) (gdc 0.12, using dmd 0.125)
(i686-pc-cygwin)
	compiled by GNU C version 3.4.4 (cygming special) (gdc 0.12, using dmd
0.125).
GGC heuristics: --param ggc-min-expand=99 --param ggc-min-heapsize=129981
g_ansi.c:3:12: invalid suffix "b00000000" on integer constant
Comment 2 baptiste fouques 2005-09-02 15:33:13 UTC
I don't add the .i file, since the source .c doesn't have any preproc' tags
Comment 3 Andrew Pinski 2005-09-02 15:37:54 UTC
No 0b is not a ANSI C requirement.

Anyways this is a dup of bug 23479.

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