This is the mail archive of the gcc-bugs@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]

[Bug ada/28394] New: Ambiguous call not detected when using dotted notation


See attached code example.

When using dotted notation to call Setup() (as in first line in Test
procedure), the compiler doesn't say anything, the Setup() procedure actually
called is the one from the package Pkg.

When using traditional notation (as in second line in Test procedure), the
compiler outputs an ambiguity error message:

test.adb:6:11: ambiguous expression (cannot resolve "Setup")
test.adb:6:11: possible interpretation at der_pkg.ads:5
test.adb:6:11: possible interpretation at der_pkg.ads:3

Which seems more sensible than no message at all.

The attached "bug" file can be expanded to five files using gnatchop.

The program has been compiled using:
$ gnatmake -gnat05 test
...which calls: 
gcc -c -gnat05 test.adb


"gcc -v" outputs:
$ gcc -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.1.1/configure --prefix=/home/yves/Programs/gcc411/
--enable-languages=ada,c,c++,fortran --enable-libada
Thread model: posix
gcc version 4.1.1

For information, this misbehaviour has been initially found using the latest
GNAT GPL 2006 from AdaCore.


-- 
           Summary: Ambiguous call not detected when using dotted notation
           Product: gcc
           Version: 4.1.1
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: ada
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: kafka dot fr at laposte dot net
GCC target triplet: i686-pc-linux-gnu


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]