This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [rfa/testsuite] constvars.exp, volatile.exp: hp-ux
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Michael Elizabeth Chastain <mec dot gnu at mindspring dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Wed, 7 Jan 2004 17:40:41 -0500
- Subject: Re: [rfa/testsuite] constvars.exp, volatile.exp: hp-ux
- References: <20040107223849.B6ED24B35A@berman.michael-chastain.com>
On Wed, Jan 07, 2004 at 05:38:49PM -0500, Michael Chastain wrote:
> This patch improves constvars.exp and volatile.exp to work with
> the HP compilers on hp-ux.
>
> First, there was some code to force use of the HP C++ compiler instead
> of the HP C compiler. I killed that. The user decides at a higher
> level which compilers to use for which languages.
>
> That bit of code wasn't even helping because HP C++ returns a (valid)
> compiler error for constvars.c. For the curious, this line is
> not valid C++:
>
> # Uninitialized const/reference member in class/aggregate.
> struct crass { char * const ptr; } crass;
>
> Since ptr itself is const, it can't be changed after it's initialized,
> so it must be initialized.
>
> I'm not dealing with that right now. gdb.base/*.c does not have to
> compile with a C++ compiler.
>
> Second, I removed a duplicate call to get_compiler_info. That's
> just cleanup.
>
> Third, in local_compiler_xfail_check, I added setup_xfail for
> $hp_cc_compiler. The HP Ansi C compiler does not emit const qualifiers,
> so this is really an XFAIL, a limitation in the external compiler. I
> checked that by stepping through hpread.c by hand.
>
> Tested on:
>
> native hppa2.0w-hp-hpux11.11, hp ansi c
>
> Okay to commit?
Yes, this is fine.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer