From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9889 invoked by alias); 9 Jun 2004 16:05:44 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 9878 invoked from network); 9 Jun 2004 16:05:42 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 9 Jun 2004 16:05:42 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i59G5gi7024151 for ; Wed, 9 Jun 2004 12:05:42 -0400 Received: from localhost.redhat.com (porkchop.devel.redhat.com [172.16.58.2]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i59G5f028442; Wed, 9 Jun 2004 12:05:41 -0400 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id CC1CE2B9D; Wed, 9 Jun 2004 12:05:34 -0400 (EDT) Message-ID: <40C7354E.7060500@gnu.org> Date: Wed, 09 Jun 2004 16:05:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-GB; rv:1.4.1) Gecko/20040217 MIME-Version: 1.0 To: Michael Elizabeth Chastain Cc: gdb@sources.redhat.com Subject: Re: Checking for minor-minor GCC version in testsuite References: <20040609154939.5D11D4B104@berman.michael-chastain.com> In-Reply-To: <20040609154939.5D11D4B104@berman.michael-chastain.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-06/txt/msg00072.txt.bz2 > 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