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] Null-exclusion must match for parameters for full conformance


AI 0046 requires that null-exclusion must match for access parameters
to achieve full conformance. This patch implements that check as shown
by the following example:

     1. procedure nullex is
     2.    package P is
     3.       type T is tagged null record;
     4.       procedure Something (Must_Match : access T);
     5.    end P;
     6.
     7.    package body P is
     8.       procedure Something (Must_Match : not null access T) is
                        |
        >>> not fully conformant with declaration at line 4
        >>> null exclusion for "Must_Match" does not match

     9.       begin null; end;
    10.    end P;
    11. begin
    12.    null;
    13. end;

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

2010-10-08  Robert Dewar  <dewar@adacore.com>

	* sem_ch6.adb (Check_Conformance): Check null exclusion match for full
	conformance.

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]