From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29755 invoked by alias); 19 May 2011 10:16:43 -0000 Received: (qmail 29745 invoked by uid 22791); 19 May 2011 10:16:42 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 19 May 2011 10:16:28 +0000 Received: (qmail 18709 invoked from network); 19 May 2011 10:16:27 -0000 Received: from unknown (HELO digraph.polyomino.org.uk) (joseph@127.0.0.2) by mail.codesourcery.com with ESMTPA; 19 May 2011 10:16:27 -0000 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.72) (envelope-from ) id 1QN0HK-0002cI-Ho; Thu, 19 May 2011 10:16:26 +0000 Date: Thu, 19 May 2011 10:16:00 -0000 From: "Joseph S. Myers" To: Mark Kettenis cc: yao@codesourcery.com, gdb-patches@sourceware.org Subject: Re: [_Complex test 1/4] support_complex_tests in gdb.exp and pass _Complex args to func In-Reply-To: <201105190814.p4J8EMYF020774@glazunov.sibelius.xs4all.nl> Message-ID: References: <4DC401D0.1050500@codesourcery.com> <4DC75036.4040806@codesourcery.com> <4DD49BE7.80206@codesourcery.com> <201105190814.p4J8EMYF020774@glazunov.sibelius.xs4all.nl> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-05/txt/msg00432.txt.bz2 On Thu, 19 May 2011, Mark Kettenis wrote: > Sorry, but this is wrong on many levels. For one thing, _Complex > support has very little to do with with the OS you're running. It's > primarily a compiler issue. So you should probably use a test based > on test_compiler_info here. The GCC C99 status page suggests that the > first release to properly support complex is GCC 4.5. Earlier > versions are marked as "broken" but may actually have enough support > for these simple tests. I don't believe the breakage (issues such as mixed real/complex arithmetic wrongly converting the real operand to complex type, with implications for NaNs and signed zeros) is of any relevance to the GDB tests. I'd think the right approach is simply to see if the compiler accepts a trivial source file of the form _Complex float cf; _Complex double cd; _Complex long double cld; and if it does, then presume complex support is present. -- Joseph S. Myers joseph@codesourcery.com