public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/23973] New: without -gnat05, GNAT warns that interface is new kw, but misses one frequent occurence
@ 2005-09-19 20:40 bauhaus at futureapps dot de
  2005-09-19 22:13 ` [Bug ada/23973] " laurent at guerby dot net
  0 siblings, 1 reply; 3+ messages in thread
From: bauhaus at futureapps dot de @ 2005-09-19 20:40 UTC (permalink / raw)
  To: gcc-bugs

Consider

package Ip is

   type T is interface;

end Ip;

GNATMAKE 4.1.0 20050915 (experimental)
Copyright 1995-2004 Free Software Foundation, Inc.
  "ip.ali" being checked ...
  -> "ip.ali" missing.
gcc -c -gnatwa -gnatf -gnatv ip.ads

GNAT 4.1.0 20050915 (experimental)
Copyright 1992-2005 Free Software Foundation, Inc.

Compiling: ip.ads (source file time stamp: 2005-09-19 20:18:33)

     3.    type T is interface;
                    |
        >>> missing "new"

 5 lines: 1 error
End of compilation

In this case the compiler doesn't detect that interface is a
reserved word in Ada 2005 (nothing wrong here, as -gnat05 hadn't
been given). It does detect this though, when for example T is
declared to be a limited interface:

   type T is limited interface;

     3.    type T is limited interface;
                     |
        >>> abstract interface is an Ada 2005 extension
        >>> unit must be compiled with -gnat05 switch

Likewise, for the semi-garbage input

package LIp is interface

     1. package LIp is interface
                       |
        >>> warning: "interface" is a reserved word in Ada 2005
        >>> declaration expected

It would be nice if GNAT could issue a similar warning when
"interface" appears after plain "type T is".

-- 
           Summary: without -gnat05, GNAT warns that interface is new kw,
                    but misses one frequent occurence
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P2
         Component: ada
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bauhaus at futureapps dot de
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-02-15 10:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-23973-5804@http.gcc.gnu.org/bugzilla/>
2006-02-15  9:42 ` [Bug ada/23973] without -gnat05, GNAT warns that interface is new kw, but misses one frequent occurence charlet at gcc dot gnu dot org
2006-02-15 10:34 ` charlet at gcc dot gnu dot org
2005-09-19 20:40 [Bug ada/23973] New: " bauhaus at futureapps dot de
2005-09-19 22:13 ` [Bug ada/23973] " laurent at guerby dot net

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).