From patchwork Tue Jan 3 04:53:45 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans-Peter Nilsson X-Patchwork-Id: 133976 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 8D2A0B6F9D for ; Tue, 3 Jan 2012 15:54:14 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1326171255; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:Received:Received:Date:Message-Id:From:To: Subject:MIME-Version:Content-Type:Content-Transfer-Encoding: Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:Sender:Delivered-To; bh=QgKYvKQSKom4rou9vMg+ Axq+odg=; b=UbWcJKlOfKcRrCfMAOsOq8NBWDT4QF2Hw+vdYRTjWUJ7PriPQFyp BHb+w2SiALsxW8FFecQpuF/a/D/FwDQUIab/Kd1kzY2ZyjEkWLXqmHQLb73/D3Iy h8OB13U/oPI/kul4ub3eMSRwJikqW36P/K/pBARg36hjJcm+dq/4olU= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:Received:Received:Received:Date:Message-Id:From:To:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=WoWbSulNRmx0GXo1OPGM+1T3BeRSSgWmNhYduXvBNjccgKRRBbNSAH/DrwysQN ADDjViPlr3b4TJn2JKsP7WGSDU1CKLmod20USrvt0u6rqWM5UtKHdEmOFEb+3+Bd r2mzlf3hhDaCoFODSQt4yXqqzRaWH9JTF2VOvW0FAYECs=; Received: (qmail 29196 invoked by alias); 3 Jan 2012 04:54:04 -0000 Received: (qmail 29180 invoked by uid 22791); 3 Jan 2012 04:54:03 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from anubis.se.axis.com (HELO anubis.se.axis.com) (195.60.68.12) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 03 Jan 2012 04:53:49 +0000 Received: from localhost (localhost [127.0.0.1]) by anubis.se.axis.com (Postfix) with ESMTP id 6666019E95; Tue, 3 Jan 2012 05:53:46 +0100 (CET) Received: from anubis.se.axis.com ([127.0.0.1]) by localhost (anubis.se.axis.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 5SkrJ5kwt-vL; Tue, 3 Jan 2012 05:53:45 +0100 (CET) Received: from thoth.se.axis.com (thoth.se.axis.com [10.0.2.173]) by anubis.se.axis.com (Postfix) with ESMTP id 93B9319E70; Tue, 3 Jan 2012 05:53:45 +0100 (CET) Received: from ignucius.se.axis.com (ignucius.se.axis.com [10.88.21.50]) by thoth.se.axis.com (Postfix) with ESMTP id 8F0943406F; Tue, 3 Jan 2012 05:53:45 +0100 (CET) Received: from ignucius.se.axis.com (localhost [127.0.0.1]) by ignucius.se.axis.com (8.12.8p1/8.12.8/Debian-2woody1) with ESMTP id q034rjF6008448; Tue, 3 Jan 2012 05:53:45 +0100 Received: (from hp@localhost) by ignucius.se.axis.com (8.12.8p1/8.12.8/Debian-2woody1) id q034rjdw008444; Tue, 3 Jan 2012 05:53:45 +0100 Date: Tue, 3 Jan 2012 05:53:45 +0100 Message-Id: <201201030453.q034rjdw008444@ignucius.se.axis.com> From: Hans-Peter Nilsson To: gcc-patches@gcc.gnu.org, fortran@gcc.gnu.org Subject: Fix cross-builds broken from C++-creep MIME-Version: 1.0 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org All cross-builds are "still" done as C. In C++ you don't need the missing struct qualifier or the typedef in "typedef struct gfc_expr ... gfc_expr;" (the struct declaration suffices) as there's no separate struct namespace IIUC. Doesn't this show a bug in the compatibility warning system, or is that turned off when bootstrapping as C++? Anyway, committed as obvious after a cris-elf build has passed the point of failure, which looked as follows (first five lines of errors). ... gcc -c -DIN_GCC_FRONTEND -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wc++-compat -fno-common -DHAVE_CONFIG_H -I. -Ifortran -I/tmp/fail0102-96/gcc/gcc -I/tmp/fail0102-96/gcc/gcc/fortran -I/tmp/fail0102-96/gcc/gcc/../include -I/tmp/fail0102-96/gcc/gcc/../libcpp/include -I/tmp/fail0102-96/gccobj/./gmp -I/tmp/fail0102-96/gcc/gmp -I/tmp/fail0102-96/gccobj/./mpfr -I/tmp/fail0102-96/gcc/mpfr -I/tmp/fail0102-96/gcc/mpc/src -I/tmp/fail0102-96/gcc/gcc/../libdecnumber -I/tmp/fail0102-96/gcc/gcc/../libdecnumber/dpd -I../libdecnumber /tmp/fail0102-96/gcc/gcc/fortran/arith.c -o fortran/arith.o In file included from /tmp/fail0102-96/gcc/gcc/fortran/arith.c:31: /tmp/fail0102-96/gcc/gcc/fortran/gfortran.h:1702: error: expected specifier-qualifier-list before 'gfc_expr' /tmp/fail0102-96/gcc/gcc/fortran/arith.c: In function 'gfc_arith_not': /tmp/fail0102-96/gcc/gcc/fortran/arith.c:418: error: 'gfc_expr' has no member named 'value' /tmp/fail0102-96/gcc/gcc/fortran/arith.c:418: error: 'gfc_expr' has no member named 'value' /tmp/fail0102-96/gcc/gcc/fortran/arith.c: In function 'gfc_arith_and': /tmp/fail0102-96/gcc/gcc/fortran/arith.c:432: error: 'gfc_expr' has no member named 'value' /tmp/fail0102-96/gcc/gcc/fortran/arith.c:432: error: 'gfc_expr' has no member named 'value' fortran: * gfortran.h (struct gfc_expr): Add missing "struct" qualifier for member base_expr. brgds, H-P Index: gcc/fortran/gfortran.h =================================================================== --- gcc/fortran/gfortran.h (revision 182825) +++ gcc/fortran/gfortran.h (working copy) @@ -1699,7 +1699,7 @@ typedef struct gfc_expr /* Used to store the base expression in component calls, when the expression is not a variable. */ - gfc_expr *base_expr; + struct gfc_expr *base_expr; /* is_boz is true if the integer is regarded as BOZ bitpatten and is_snan denotes a signalling not-a-number. */