diff options
Diffstat (limited to 'gcc/ada/styleg-c.adb')
-rw-r--r-- | gcc/ada/styleg-c.adb | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/gcc/ada/styleg-c.adb b/gcc/ada/styleg-c.adb index d9c1049..fa3690e 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 -- ---------------------- |