From patchwork Tue May 13 07:51:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Polacek X-Patchwork-Id: 348279 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)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 22F6A1400D5 for ; Tue, 13 May 2014 17:51:44 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; q=dns; s=default; b=uc5uqw5QoqsgMnyTE g0NFE9jqEAVTt58U6crNCuJU6BTsj+XMmMb926XP7JRNermqp54I+hMTmxF/Mv+f gVFp07M1rPbHLKAx/mq2iq7YqgxxI3g2zgKnTMq0kBrPfVGegSaq7SiuLqM8eprM 7N4atUFI+TSJB7r8LB+ca/svJc= 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:date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=default; bh=jEJ9cydAxtxoVcX/t240zpG DEBU=; b=HB+qhtI185R3WeQbz8dPiUmE+ubUxrCriWZ+bv/AoHvtKJITOxpTrS1 anMxTZpWx6xPqWyOLJFXPtCJ6neKcQ2weXqoNL3BTbo0gC1SRLs7M8NZ5nGHioaG dgkwmcZFh63XggpusjoQOZfm+fTZKfUGn4DSQbBNJ8s5eDADaigs= Received: (qmail 22843 invoked by alias); 13 May 2014 07:51:37 -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 22826 invoked by uid 89); 13 May 2014 07:51:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.1 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 13 May 2014 07:51:35 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s4D7pXUi006487 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 13 May 2014 03:51:33 -0400 Received: from redhat.com (ovpn-116-61.ams2.redhat.com [10.36.116.61]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s4D7pN9P004463 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NO); Tue, 13 May 2014 03:51:29 -0400 Date: Tue, 13 May 2014 09:51:22 +0200 From: Marek Polacek To: "Joseph S. Myers" Cc: Dominique Dhumieres , gcc-patches@gcc.gnu.org, iains@gcc.gnu.org Subject: Re: [C PATCH] Make attributes accept enum values (PR c/50459) Message-ID: <20140513075122.GC2663@redhat.com> References: <20140510141047.3D98C103@mailhost.lps.ens.fr> <20140511180141.GD23554@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) On Mon, May 12, 2014 at 03:44:42PM +0000, Joseph S. Myers wrote: > On Sun, 11 May 2014, Marek Polacek wrote: > > > > FAIL: c-c++-common/pr50459.c -std=gnu++1y (test for excess errors) > > > FAIL: c-c++-common/pr50459.c -Wc++-compat (test for excess errors) > > > > > > The errors are > > > > > > /opt/gcc/work/gcc/testsuite/c-c++-common/pr50459.c:8:1: error: constructor priorities are not supported > > > /opt/gcc/work/gcc/testsuite/c-c++-common/pr50459.c:9:1: error: destructor priorities are not supported > > > > Ah. The following untested patch should skip that test on Darwin. > > > > Ok? > > I don't think the whole test should be skipped for that issue; I think the > part requiring this feature should be split out into a separate testcase, > so that as much as possible is still tested on Darwin. Yeah, I should've done that in the first place, sorry. Is the following ok then? 2014-05-13 Marek Polacek * c-c++-common/pr50459.c: Move cdtor tests to a separate testcase. * c-c++-common/pr50459-2.c: New test. Marek diff --git gcc/testsuite/c-c++-common/pr50459-2.c gcc/testsuite/c-c++-common/pr50459-2.c index e69de29..0e8fec3 100644 --- gcc/testsuite/c-c++-common/pr50459-2.c +++ gcc/testsuite/c-c++-common/pr50459-2.c @@ -0,0 +1,7 @@ +/* PR c/50459 */ +/* { dg-do compile { target init_priority } } */ +/* { dg-options "-Wall -Wextra" } */ + +enum { A = 128, B = 1 }; +void fn3 (void) __attribute__((constructor (A))); +void fn4 (void) __attribute__((destructor (A))); diff --git gcc/testsuite/c-c++-common/pr50459.c gcc/testsuite/c-c++-common/pr50459.c index f837b63..8d75228 100644 --- gcc/testsuite/c-c++-common/pr50459.c +++ gcc/testsuite/c-c++-common/pr50459.c @@ -5,8 +5,6 @@ enum { A = 128, B = 1 }; void *fn1 (void) __attribute__((assume_aligned (A))); void *fn2 (void) __attribute__((assume_aligned (A, 4))); -void fn3 (void) __attribute__((constructor (A))); -void fn4 (void) __attribute__((destructor (A))); void *fn5 (int) __attribute__((alloc_size (B))); void *fn6 (int) __attribute__((alloc_align (B))); void fn7 (const char *, ...) __attribute__ ((sentinel (B)));