From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16856 invoked by alias); 5 Dec 2002 04:29:14 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 16817 invoked from network); 5 Dec 2002 04:29:13 -0000 Received: from unknown (HELO duracef.shout.net) (204.253.184.12) by sources.redhat.com with SMTP; 5 Dec 2002 04:29:13 -0000 Received: (from mec@localhost) by duracef.shout.net (8.11.6/8.11.6) id gB54T8h31459; Wed, 4 Dec 2002 22:29:08 -0600 Date: Wed, 04 Dec 2002 20:29:00 -0000 From: Michael Elizabeth Chastain Message-Id: <200212050429.gB54T8h31459@duracef.shout.net> To: drow@mvista.com, fnasser@redhat.com Subject: Re: [RFA/testsuite] Test printing complex numbers in C Cc: gdb-patches@sources.redhat.com X-SW-Source: 2002-12/txt/msg00133.txt.bz2 Fernando Nasser writes: > I wonder if we wouldn't do something with regards to compiler (GCC) > versions as well. I think we should bite the bullet and add something to lib/gdb.exp to figure out the compiler version. In fact, I see that we already do! The variable "gcc_compiled" is set to __GNUC__ if that is defined, or 0 if nothing is defined. "info cpp" says that __GNUC__ equals the major version of the compiler: 2 for gcc 2.x and 3 for gcc 3.x. This is a documented feature so we can rely on it being the major version number for all gcc's forever. So "gcc_compiled" is more than a boolean, it actually has the values: 0 not gnu c 2 gcc v2 3 gcc v3 I haven't actually tested this because I'm kinda tired and my test bed is cranking on 5.2.91 and I don't want to get close to its playpen and I don't want to start a different test bed. As far as using it goes, I agree with Fernando, it's usually a good idea, because it increases the specificity of the test suite. Also it makes the test suite a lot easier to maintain because it's clear which results are expected from which compilers, so that people can read it easier, and obsolete compilers can be de-supported more easily. Michael C