From patchwork Tue Sep 10 15:15:24 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaud Charlet X-Patchwork-Id: 273912 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 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 94E682C011D for ; Wed, 11 Sep 2013 01:16:18 +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:mime-version:content-type; q=dns; s=default; b=jWuE9H8RXDNyIlqGx4atQku77e8qoLx15XxPTqvujsrDCYWGFk pxixz1pzK3MfyHBw6LQM0hKkM6hNO3J0b9Rhd5M019d4OwHqK1FmgOD2HIJLfWCi +WUiRLAFv2oyJh4fSff6MzGc4P9mbA/F8RrCO+CAnozdxP0cqVLZ6dt78= 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:mime-version:content-type; s= default; bh=hoIEoFjkVs3n+6kDu8SuAB9crYE=; b=ROp4LeU+V8gRWcAciLol ewt9If8zqFxBGkMLBTyK+I1eUvXYrOkEQ+BsTny41CwEIQ7UD4cuoBP1bEJAo7Ju UOn+KF4hlxpP4uTqQmi1nTqwk+senuFSpPLt/+XEn0daIHJi/C1pCnh/RHXRCyPG gpmQKXqp+/5A8lrbvaTS2Qk= Received: (qmail 17393 invoked by alias); 10 Sep 2013 15:15:27 -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 17355 invoked by uid 89); 10 Sep 2013 15:15:27 -0000 Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Tue, 10 Sep 2013 15:15:27 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.1 required=5.0 tests=BAYES_00, RDNS_NONE autolearn=no version=3.3.2 X-HELO: rock.gnat.com Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id AC4A3116412; Tue, 10 Sep 2013 11:15:36 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id TCrWfbxbNfH4; Tue, 10 Sep 2013 11:15:36 -0400 (EDT) Received: from kwai.gnat.com (unknown [IPv6:2620:20:4000:0:a6ba:dbff:fe26:1f63]) by rock.gnat.com (Postfix) with ESMTP id 9B3F31161ED; Tue, 10 Sep 2013 11:15:36 -0400 (EDT) Received: by kwai.gnat.com (Postfix, from userid 4192) id D378B3FB31; Tue, 10 Sep 2013 11:15:24 -0400 (EDT) Date: Tue, 10 Sep 2013 11:15:24 -0400 From: Arnaud Charlet To: gcc-patches@gcc.gnu.org Cc: Robert Dewar Subject: [Ada] Don't allow REASON parameter for pragma Warnings in compiler unit Message-ID: <20130910151524.GA25754@adacore.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) This patch forbids the use of the pragma Warnings REASON parameter in compiler units (since this would cause bootstrap issues). This is for internal development purposes only. No functionality change. Tested on x86_64-pc-linux-gnu, committed on trunk 2013-09-10 Robert Dewar * sem_prag.adb (Analyze_Pragma, case Warnings): Don't allow REASON parameter in compiler units (bootstrap issues). Index: sem_prag.adb =================================================================== --- sem_prag.adb (revision 202462) +++ sem_prag.adb (working copy) @@ -17958,6 +17958,10 @@ then Check_Arg_Is_Static_Expression (Last_Arg, Standard_String); Arg_Count := Arg_Count - 1; + + -- Not allowed in compiler units (bootstrap issues) + + Check_Compiler_Unit (N); end if; end;