From patchwork Thu Dec 5 09:00:10 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleg Endo X-Patchwork-Id: 296749 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 5949C2C00A2 for ; Thu, 5 Dec 2013 20:01:08 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:subject:from:to:date:content-type:mime-version; q= dns; s=default; b=kI71f/hSFeTVrrsAJRYSYsZkf6fLZ9scTSmsDqtl4V2ze8 aDl0V4blDuYzBGyG5XTdW/tfcB9L1wXAdqyOqEZAKQAXqvHV2SlgaXkNlVciguHQ zsxTo7fcVAu/0qtGiOweecINuDioZzx2oY2fit9TDPr9OOh/1tWh+YMjzX46Y= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:subject:from:to:date:content-type:mime-version; s= default; bh=R4n+WnEQbskqmNeR6FZ7hO8kncU=; b=WwPmB89oPyHzTcvMrbG1 VjtgiTmxjkSCc+BxlK+hbwUuOtfDOWh7wpy3u33AKN8lkQvob5Uc0RE7NPbe53Ug No5l7JNvrzCN62vCdWKHoOrUb9uJcL68dqUTSShJmxf6Isy71+nwKIYoAlDIf/xW iNkveAst1EV7wPlcFjX4H0k= Received: (qmail 26256 invoked by alias); 5 Dec 2013 09:00:38 -0000 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 Received: (qmail 26148 invoked by uid 89); 5 Dec 2013 09:00:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, UNPARSEABLE_RELAY autolearn=ham version=3.3.2 X-HELO: mailout05.t-online.de Received: from Unknown (HELO mailout05.t-online.de) (194.25.134.82) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 05 Dec 2013 09:00:37 +0000 Received: from fwd09.aul.t-online.de (fwd09.aul.t-online.de ) by mailout05.t-online.de with smtp id 1VoUnD-0007Ju-LZ; Thu, 05 Dec 2013 10:00:19 +0100 Received: from [192.168.0.103] (VrWlSkZEwhd1zXyZN6j1ou97mPRJbPkik9NKMiirSHDUJGXsz7zeXo7HLwQGfomZmq@[87.155.248.64]) by fwd09.t-online.de with esmtp id 1VoUn6-0Sk9y40; Thu, 5 Dec 2013 10:00:12 +0100 Message-ID: <1386234010.14008.18.camel@yam-132-YW-E178-FTW> Subject: Silence class vs. struct warnings (vec) From: Oleg Endo To: gcc-patches Date: Thu, 05 Dec 2013 10:00:10 +0100 Mime-Version: 1.0 X-IsSubscribed: yes Hi, When building GCC on OSX with its native XCode/Clang tools, it outputs quite some "struct X was previously declared as a class" or similar warnings (-Wmismatched-tags is enabled by default). The attached patch fixes a mismatch in struct vec_prefix when referring to struct vec. Tested with make all-gcc. OK for trunk? Cheers, Oleg gcc/ChangeLog: * vec.h (struct vec_prefix): Use struct vec instead of class vec. Index: gcc/vec.h =================================================================== --- gcc/vec.h (revision 205573) +++ gcc/vec.h (working copy) @@ -1216,7 +1216,7 @@ } private: - friend class vec; + friend struct vec; vec_prefix m_header; T m_data[N];