summaryrefslogtreecommitdiff
path: root/gcc/ada/styleg-c.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2007-04-06 09:25:29 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2007-04-06 09:25:29 +0000
commit59ac57b560f56b6c7944751f579fcedcfa22bc15 (patch)
tree5452d8d7f7de1a366e554e6d5ccd84c49ad180c9 /gcc/ada/styleg-c.adb
parent271c020ead1f48b22927837e9617a5dc78bbbe9e (diff)
downloadgcc-59ac57b560f56b6c7944751f579fcedcfa22bc15.tar.gz
2007-04-06 Robert Dewar <dewar@adacore.com>
* sem_ch13.ads, sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order): Use First/Next_Component_Or_Discriminant (Analyze_Record_Representation_Clause): Use First/Next_Component_Or_Discriminant (Check_Component_Overlap): Use First/Next_Component_Or_Discriminant (Analyze_Attribute_Definition_Clause, case Value_Size): Reject definition if type is unconstrained. (Adjust_Record_For_Reverse_Bit_Order): New procedure (Analyze_Attribute_Definition_Clause): Split Is_Abstract flag into Is_Abstract_Subprogram and Is_Abstract_Type. (Adjust_Record_For_Reverse_Bit_Order): New procedure * repinfo.adb (List_Record_Info): Use First/ Next_Component_Or_Discriminant. * style.ads, styleg-c.adb, styleg-c.ads (Check_Array_Attribute_Index): New procedure. * stylesw.ads, stylesw.adb: Recognize new -gnatyA style switch Include -gnatyA in default switches * opt.ads: (Warn_On_Non_Local_Exception): New flag (Warn_On_Reverse_Bit_Order): New flag (Extensions_Allowed): Update the documentation. (Warn_On_Questionable_Missing_Parens): Now on by default * usage.adb: Add documentation of -gnatw.x/X switches Document new -gnatyA style switch -gnatq warnings are on by default git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123590 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/styleg-c.adb')
-rw-r--r--gcc/ada/styleg-c.adb25
1 files changed, 24 insertions, 1 deletions
diff --git a/gcc/ada/styleg-c.adb b/gcc/ada/styleg-c.adb
index d9c1049107f..fa3690ea427 100644
--- a/gcc/ada/styleg-c.adb
+++ b/gcc/ada/styleg-c.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2005 Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2006, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -67,6 +67,29 @@ package body Styleg.C is
end if;
end Body_With_No_Spec;
+ ---------------------------------
+ -- Check_Array_Attribute_Index --
+ ---------------------------------
+
+ procedure Check_Array_Attribute_Index
+ (N : Node_Id;
+ E1 : Node_Id;
+ D : Int)
+ is
+ begin
+ if Style_Check_Array_Attribute_Index then
+ if D = 1 and then Present (E1) then
+ Error_Msg_N
+ ("(style) index number not allowed for one dimensional array",
+ E1);
+ elsif D > 1 and then No (E1) then
+ Error_Msg_N
+ ("(style) index number required for multi-dimensional array",
+ N);
+ end if;
+ end if;
+ end Check_Array_Attribute_Index;
+
----------------------
-- Check_Identifier --
----------------------