From 0871eab295b615c10c70581240050c1822d3c419 Mon Sep 17 00:00:00 2001 From: charlet Date: Fri, 4 Jan 2013 09:28:49 +0000 Subject: 2013-01-04 Robert Dewar * types.ads, prj-conf.adb, par-tchk.adb: Minor reformatting. 2013-01-04 Robert Dewar * par-ch6.adb (P_Subprogram): Better handling of missing IS after expression function. * par-util.adb (No_Constraint): Improve handling to avoid bad warnings. 2013-01-04 Robert Dewar * exp_util.ads, exp_util.adb (Insert_Actions): In expression with actions case, new actions are appended to the sequence rather than prepended. 2013-01-04 Robert Dewar * gnat_ugn.texi: Document -gnatw.d/w.D (does no apply in VMS mode). * usage.adb: Add lines for -gnatw.d/w.D switches. * warnsw.adb: Minor fixes (some missing cases of setting Warning_Doc_Switch). Reject -gnatw.d and -gnatw.D in VMS mode. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194895 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/par-util.adb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'gcc/ada/par-util.adb') diff --git a/gcc/ada/par-util.adb b/gcc/ada/par-util.adb index fa592a7ea50..e18801f024f 100644 --- a/gcc/ada/par-util.adb +++ b/gcc/ada/par-util.adb @@ -635,6 +635,15 @@ package body Util is procedure No_Constraint is begin + -- If next token is at start of line, don't object, it seems relatively + -- unlikely that a constraint would be on its own starting a line. + + if Token_Is_At_Start_Of_Line then + return; + end if; + + -- Otherwise if we have a token that could start a constraint, object + if Token in Token_Class_Consk then Error_Msg_SC ("constraint not allowed here"); Discard_Junk_Node (P_Constraint_Opt); -- cgit v1.2.1