From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11458 invoked by alias); 15 Jul 2006 10:18:50 -0000 Received: (qmail 11224 invoked by uid 48); 15 Jul 2006 10:18:43 -0000 Date: Sat, 15 Jul 2006 10:18:00 -0000 Message-ID: <20060715101843.11223.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/27227] [4.0 Regression] rejects valid code with some extern "C" In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "tbm at cyrius dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-07/txt/msg01099.txt.bz2 List-Id: ------- Comment #9 from tbm at cyrius dot com 2006-07-15 10:18 ------- (In reply to comment #6) > Could I get clarification if the following error is a desired effect of this > change. Prior to this, the included program gave no error. I believe the > change was caused by this patch. > > e.c:1: error: previous declaration of 'int i' with 'C++' linkage > e.c:4: error: conflicts with new declaration with 'C' linkage > > [hpclear8] $ cat e.c > > extern int i; > > extern "C" { > extern int i; > } So apparently this is invalid code. However, I feel very strongly that a point release of GCC should *not* introduce a new error - Mark, please modify the patch applied to the 4.1 branch in a way to allow this code. -- tbm at cyrius dot com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mmitchel at gcc dot gnu dot | |org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27227