This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [patch/testsuite] compiler.cc, compiler.c: work with old hp acc
- From: Daniel Jacobowitz <drow at false dot org>
- To: Michael Elizabeth Chastain <mec dot gnu at mindspring dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Wed, 30 Jun 2004 09:10:57 -0400
- Subject: Re: [patch/testsuite] compiler.cc, compiler.c: work with old hp acc
- References: <20040630075939.64DDD4B104@berman.michael-chastain.com>
On Wed, Jun 30, 2004 at 03:59:39AM -0400, Michael Chastain wrote:
> After some experimentation and cursing, it looks like their compiler
> does aggressive string concatenation. If the last token in the line is
> a string, then the preprocessor eats the newline in order to merge with
> the first token on the next line, in case that token is a string.
THANK you! I ran into this recently and couldn't figure out what the
problem was.
There's also some option you can pass to aCC to stop it from doing this
- there's an ANSI and a non-ANSI preprocessor and you can explicitly
specify the ANSI one.
> ! /* Note the semicolon at the end of this line. Older versions of
> ! hp c++ have a bug in string preprocessing: if the last token on a
> ! line is a string, then the preprocessor concatenates the next line
> ! onto the current line and eats the newline! That messes up TCL of
> ! course. That happens with HP aC++ A.03.13, but it no longer happens
> ! with HP aC++ A.03.45. */
> !
> ! set compiler_info "unknown" ;
>
> #if defined (__GNUC__)
> #if defined (__GNUC_PATCHLEVEL__)
>
I saw this with A.03.37.
--
Daniel Jacobowitz