GNAT switches the location of the full type and the incomplete type when a
tagged type is completed with a non-tagged record:

% gcc -gnatv -c p.ads
GNAT 4.4.0 20080409 (experimental)
Copyright 1992-2008, Free Software Foundation, Inc.

Compiling: p.ads (source file time stamp: 2008-04-09 13:15:07)

     3.    type T is tagged;
                |
        >>> full declaration of type "T" defined at line 4 must be tagged

 6 lines: 1 error

-- 
package P is

   type T is tagged;
   type T is null record;

end P;


-- 
           Summary: Bad location of error message
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: ada
        AssignedTo: sam at gcc dot gnu dot org
        ReportedBy: sam at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35886

Reply via email to