* Checking for minor-minor GCC version in testsuite
@ 2004-06-09 14:33 Andrew Cagney
0 siblings, 0 replies; 3+ messages in thread
From: Andrew Cagney @ 2004-06-09 14:33 UTC (permalink / raw)
To: gdb
Hello,
Is there a way to check the minor-minor GCC version? I'm seeing this:
KPASS: gdb.base/structs.exp: p/c L<n>; call 4 structs-tc-tl (PRMS gdb/1455)
which corresponds to:
setup_compiler_kfails structs-tc-* gcc-3-3 "DWARF 2" i*86-*-* gdb/1455
The problem, present in gcc 3.3.2 appears to be fixed in gcc 3.3.3 (or
at least Red Hat's variant).
Andrew
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Checking for minor-minor GCC version in testsuite
@ 2004-06-09 15:49 Michael Elizabeth Chastain
2004-06-09 16:05 ` Andrew Cagney
0 siblings, 1 reply; 3+ messages in thread
From: Michael Elizabeth Chastain @ 2004-06-09 15:49 UTC (permalink / raw)
To: cagney, gdb
Andrew Cagney writes:
> Is there a way to check the minor-minor GCC version?
gcc provides __GNUC_PATCHLEVEL__ but the test suite doesn't use it.
In lib/compiler.c and lib/compiler.cc you could edit:
-set compiler_info [join {gcc __GNUC__ __GNUC_MINOR__} -]
+set compiler_info [join {gcc __GNUC__ __GNUC_MINOR__ __GNUC_PATCH_LEVEL__} -]
Test before-and-after; for extra style, change the existing 39 calls
to test_compiler_info:
gcc-2-* gcc-2-*-*
gcc-*-* gcc-*-*-*
et cetera
One gotcha: __GNUC_PATCHLEVEL__ is not available in gcc 2.95.3. I think
this is okay because the compiler_info string will just expand to
"gcc-2-95-__GNUC_PATCHLEVEL__" so as long as no one is looking to
distinguish between gcc 2.95.2 and gcc 2.95.3 it's okay. Tests for
"gcc-2-*" or "gcc-2-*-*" ought to work. This gotcha will need a comment
though. (The gcc doco for 3.3.3 says that __GNUC_PATCHLEVEL__ was
introduced with gcc 3.0 and also works in gcc 2.96 and gcc 2.97).
You could do this, or file a PR and I'll do it.
> The problem, present in gcc 3.3.2 appears to be fixed in gcc 3.3.3 (or
> at least Red Hat's variant).
Or you could just cop out and treat all of gcc-3-3 as broken.
Andrew
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Checking for minor-minor GCC version in testsuite
2004-06-09 15:49 Michael Elizabeth Chastain
@ 2004-06-09 16:05 ` Andrew Cagney
0 siblings, 0 replies; 3+ messages in thread
From: Andrew Cagney @ 2004-06-09 16:05 UTC (permalink / raw)
To: Michael Elizabeth Chastain; +Cc: gdb
> Andrew Cagney writes:
>
>>> Is there a way to check the minor-minor GCC version?
>
>
> gcc provides __GNUC_PATCHLEVEL__ but the test suite doesn't use it.
>
> In lib/compiler.c and lib/compiler.cc you could edit:
>
> -set compiler_info [join {gcc __GNUC__ __GNUC_MINOR__} -]
> +set compiler_info [join {gcc __GNUC__ __GNUC_MINOR__ __GNUC_PATCH_LEVEL__} -]
>
> Test before-and-after; for extra style, change the existing 39 calls
> to test_compiler_info:
>
> gcc-2-* gcc-2-*-*
> gcc-*-* gcc-*-*-*
> et cetera
>
> One gotcha: __GNUC_PATCHLEVEL__ is not available in gcc 2.95.3. I think
> this is okay because the compiler_info string will just expand to
> "gcc-2-95-__GNUC_PATCHLEVEL__" so as long as no one is looking to
> distinguish between gcc 2.95.2 and gcc 2.95.3 it's okay. Tests for
> "gcc-2-*" or "gcc-2-*-*" ought to work. This gotcha will need a comment
> though. (The gcc doco for 3.3.3 says that __GNUC_PATCHLEVEL__ was
> introduced with gcc 3.0 and also works in gcc 2.96 and gcc 2.97).
>
> You could do this, or file a PR and I'll do it.
I'll do this - will need to audit calls that test compiler info.
>
>>> The problem, present in gcc 3.3.2 appears to be fixed in gcc 3.3.3 (or
>>> at least Red Hat's variant).
>
>
> Or you could just cop out and treat all of gcc-3-3 as broken.
That leaves me with the KPASSs :-(
Andrew
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-06-09 16:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-09 14:33 Checking for minor-minor GCC version in testsuite Andrew Cagney
2004-06-09 15:49 Michael Elizabeth Chastain
2004-06-09 16:05 ` Andrew Cagney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox