This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Ada] Short_Integer should be considered implementation defined


For the purposes of restriction No_Implementation_Identifiers,
Standard.Short_Integer should be considered as being implementation
defined and this was not the case. In addition, this patch fixes
a compiler blow up with a compiler built with assertions in the
test for implementation-defined identifiers. Note that the latter
problem is not documented in the KP entry for this ticket, since
it shows up only in compilers built with assertions.

The following should compile as indicated with -gnatld7 -gnatj55

     1. pragma Restriction_Warnings
     2.          (No_Implementation_Identifiers);
     3. package ImplIdent is
     4.      subtype Integer_8 is Standard.Short_Short_Integer;
                                           |
        >>> warning: violation of restriction
            "No_Implementation_Identifiers" at line 1

     5.      subtype Integer_16 is Standard.Short_Integer;
                                            |
        >>> warning: violation of restriction
            "No_Implementation_Identifiers" at line 1

     6. end;

Tested on x86_64-pc-linux-gnu, committed on trunk

2014-10-17  Robert Dewar  <dewar@adacore.com>

	* cstand.adb (Create_Standard): Mark Short_Integer as
	implementation defined.
	* sem_util.adb (Set_Entity_With_Checks): Avoid blow up for
	compiler built with assertions for No_Implementation_Identifiers test.

Attachment: difs
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]