This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Serious error-causing change in new CPP's -traditional behavior
- To: thorpej at zembu dot com, Zack Weinberg <zack at wolery dot cumb dot org>, gcc-bugs at gcc dot gnu dot org
- Subject: Re: Serious error-causing change in new CPP's -traditional behavior
- From: Richard Earnshaw <rearnsha at arm dot com>
- Date: Tue, 09 May 2000 12:07:40 +0100
- Cc: rearnsha at arm dot com
- Organization: ARM Ltd.
- Reply-To: rearnsha at arm dot com
Sadly, I think -traditional will always be required for processing ARM
assembler, unless cpp is fixed to not generate an error for the following
case.
'#' introduces an immediate constant in the assembler syntax; removing it
is bogus, and worse, there is no way to escape it that I can see, other
than by playing stupid games.
test.S:
#define foo() mov r0, #5
.text
bar:
foo()
cpp -traditional test.S OK
# 1 "test.S"
.text
bar:
mov r0, #5
mov r0, #5
cpp test.S NOT OK
# 1 "test.S"
test.S:1:25: # is not followed by a macro argument name
.text
bar:
mov r0,5
mov r0,5
Stupid game:
#define HASH #
#define foo() mov r0, HASH 5
...
cpp test.S
# 1 "test.S"
.text
bar:
ldr r0, # 5
ldr r0, # 5