This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch/testsuite] compiler.cc, compiler.c: work with old hp acc


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]