[Bug preprocessor/57580] New: Repeated _Pragma message directives in macro causes problems

2013-06-10 Thread drussel at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57580

Bug ID: 57580
   Summary: Repeated _Pragma message directives in macro causes
problems
   Product: gcc
   Version: 4.7.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: preprocessor
  Assignee: unassigned at gcc dot gnu.org
  Reporter: drussel at gmail dot com

Input:
#define BROKEN\
  _Pragma("message(\"message0\")")   \
  _Pragma("message(\"message1\")")

BROKEN


Output:
gcc -c test.cpp
test.cpp:5:2: error: stray ‘#’ in program
test.cpp:5:27: note: #pragma message: message0
test.cpp:5:3: error: ‘pragma’ does not name a type

gcc 4.6.3 and clang are both happy with the code.

[Bug preprocessor/57580] Repeated _Pragma message directives in macro causes problems

2013-06-13 Thread drussel at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57580

--- Comment #3 from Daniel Russel  ---
It looks like I confused something along the way of trying to produce a simple
example. I'll revisit it on my end. Sorry.


[Bug preprocessor/57580] Repeated _Pragma message directives in macro causes problems

2013-06-13 Thread drussel at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57580

--- Comment #4 from Daniel Russel  ---
Here we go. Sorry again.

drussel@flute:/tmp> gcc -c test.cpp 
test.cpp:8:2: error: stray ‘#’ in program
test.cpp:8:27: note: #pragma message: message0
test.cpp:8:3: error: ‘pragma’ does not name a type
drussel@flute:/tmp> cat test.cpp 
#define INNER \
 _Pragma("message(\"message0\")")

#define BROKEN\
INNER \
 _Pragma("message(\"message1\")")

BROKEN
drussel@flute:/tmp> gcc -v
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.7.2/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla
--enable-bootstrap --enable-shared --enable-threads=posix
--enable-checking=release --disable-build-with-cxx
--disable-build-poststage1-with-cxx --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-gnu-unique-object
--enable-linker-build-id --with-linker-hash-style=gnu
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin
--enable-initfini-array --enable-java-awt=gtk --disable-dssi
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
--enable-libgcj-multifile --enable-java-maintainer-mode
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib
--with-ppl --with-cloog --with-tune=generic --with-arch_32=i686
--build=x86_64-redhat-linux
Thread model: posix
gcc version 4.7.2 20121109 (Red Hat 4.7.2-8) (GCC) 


It works fine on 4.4 and 4.6 at least.

[Bug c++/36912] New: ICE when building with "-frounding-math -g"

2008-07-23 Thread drussel at gmail dot com
static const double Eps = .001; 
static const double Tol = 1.0+Eps;
int main(int, char *[]) {
return 0;
}

Fedora 9.

Works fine on MacOs 10.5 with gcc 4.0.

setting Eps to be an integral value (but keeping its type to be double) makes
the ICE go away.


-- 
   Summary: ICE when building with "-frounding-math -g"
   Product: gcc
   Version: 4.3.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: drussel at gmail dot com


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