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; 4+ 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] 4+ messages in thread

* [Bug ada/23973] without -gnat05, GNAT warns that interface is new kw, but misses one frequent occurence
  2005-09-19 20:40 [Bug ada/23973] New: without -gnat05, GNAT warns that interface is new kw, but misses one frequent occurence bauhaus at futureapps dot de
@ 2005-09-19 22:13 ` laurent at guerby dot net
  0 siblings, 0 replies; 4+ messages in thread
From: laurent at guerby dot net @ 2005-09-19 22:13 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From laurent at guerby dot net  2005-09-19 22:13 -------
Good idea.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-09-19 22:13:30
               date|                            |


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


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

* [Bug ada/23973] without -gnat05, GNAT warns that interface is new kw, but misses one frequent occurence
       [not found] <bug-23973-5804@http.gcc.gnu.org/bugzilla/>
  2006-02-15  9:42 ` charlet at gcc dot gnu dot org
@ 2006-02-15 10:34 ` charlet at gcc dot gnu dot org
  1 sibling, 0 replies; 4+ messages in thread
From: charlet at gcc dot gnu dot org @ 2006-02-15 10:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from charlet at gcc dot gnu dot org  2006-02-15 10:34 -------
Done on trunk


-- 

charlet at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.2.0


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


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

* [Bug ada/23973] without -gnat05, GNAT warns that interface is new kw, but misses one frequent occurence
       [not found] <bug-23973-5804@http.gcc.gnu.org/bugzilla/>
@ 2006-02-15  9:42 ` charlet at gcc dot gnu dot org
  2006-02-15 10:34 ` charlet at gcc dot gnu dot org
  1 sibling, 0 replies; 4+ messages in thread
From: charlet at gcc dot gnu dot org @ 2006-02-15  9:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from charlet at gcc dot gnu dot org  2006-02-15 09:42 -------
Subject: Bug 23973

Author: charlet
Date: Wed Feb 15 09:42:14 2006
New Revision: 111080

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=111080
Log:
2006-02-13  Javier Miranda  <miranda@adacore.com>

        PR ada/23973

        * par-ch3.adb (P_Derived_Type_Def_Or_Private_Ext_Decl): Reorganize the
        code to improve the error message reported when the program has
        declarations of abstract interface types and it is not compiled with
        the -gnat05 switch.
        (P_Access_Definition): Reorganize the code to improve the error
        message reported when the new Ada 2005 syntax for anonymous
        access types is used and the program is not compiled with the
        -gnat05 switch.


Modified:
    trunk/gcc/ada/par-ch3.adb


-- 


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


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

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

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

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).