From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16692 invoked by alias); 9 Jun 2004 15:49:21 -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 16588 invoked from network); 9 Jun 2004 15:49:18 -0000 Received: from unknown (HELO granger.mail.mindspring.net) (207.69.200.148) by sourceware.org with SMTP; 9 Jun 2004 15:49:18 -0000 Received: from user-119a90a.biz.mindspring.com ([66.149.36.10] helo=berman.michael-chastain.com) by granger.mail.mindspring.net with esmtp (Exim 3.33 #1) id 1BY5KF-00056a-00; Wed, 09 Jun 2004 11:49:15 -0400 Received: by berman.michael-chastain.com (Postfix, from userid 502) id 5D11D4B104; Wed, 9 Jun 2004 11:49:39 -0400 (EDT) To: cagney@gnu.org, gdb@sources.redhat.com Subject: Re: Checking for minor-minor GCC version in testsuite Message-Id: <20040609154939.5D11D4B104@berman.michael-chastain.com> Date: Wed, 09 Jun 2004 15:49:00 -0000 From: mec.gnu@mindspring.com (Michael Elizabeth Chastain) X-SW-Source: 2004-06/txt/msg00071.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. > 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