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

            Bug ID: 61127
           Summary: GNAT incorrectly accepts <> as a second association of
                    a generic formal package
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
          Assignee: unassigned at gcc dot gnu.org
          Reporter: georggcc at googlemail dot com

Assuming that in generic associations, a box needs to have "others =>" before
it unless it is the sole item, GNAT should reject:

with Ada.Containers.Vectors;
generic
   with package G is new Ada.Containers.Vectors (Natural, Positive, <>);
package Gen_Pak is end Gen_Pak;

$ gnatmake -gnatwa -gnatg gen_pak.ads
gcc -c -gnatwa gen_pak.ads
$ gcc -v
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/Volumes/Macintosh\
HD/Users/bauhaus/4.9/bin/../libexec/gcc/x86_64-apple-darwin13.1.0/4.9.0/lto-wrapper
Target: x86_64-apple-darwin13.1.0
Configured with: /Macintosh_HD/Users/bauhaus/src/GCC-trunk/configure
--prefix=/Macintosh_HD/Users/bauhaus/4.9 --disable-nls
--enable-languages=c,ada,c++ CC=gcc
Thread model: posix
gcc version 4.9.0 20140331 (experimental) (GCC)

Reply via email to