This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/25993] New: -std= produces incorrect preprocessor output for .S
- From: "aldot at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Jan 2006 12:50:09 -0000
- Subject: [Bug c/25993] New: -std= produces incorrect preprocessor output for .S
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Specifying -std=c99 does not define __ASSEMBLER__ for assembler with
preprocessor inputfile (.S):
$ cat x.S
#ifndef __ASSEMBLER__
extern int func(void);
#else
.global func
.type func,%function
.align 4
func:
ret
.size func,.-func
#endif
$ gcc -c x.S -o x.o
$ gcc -c x.S -o x.o -std=c99
x.S: Assembler messages:
x.S:2: Error: no such instruction: `extern int func(void)'
$ gcc -std=c99 -x assembler-with-cpp -c x.S -o x.o
x.S: Assembler messages:
x.S:2: Error: no such instruction: `extern int func(void)'
$
I'd expect that __ASSEMBLER__ is defined even when any -std= was given.
--
Summary: -std= produces incorrect preprocessor output for .S
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: aldot at gcc dot gnu dot org
GCC build triplet: i686-linux-gnu
GCC host triplet: i686-linux-gnu
GCC target triplet: i686-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25993