Re: Filenames in Ada



Martin Krischik wrote:
Just a question. I get an NAME_ERROR exception in
Ada.Directories.More_Entries. Is that actually correct? Should the
exception not be in Ada.Directories.Simple_Name?

Sounds like a bug to me...

Assuming you are using GNAT, there is also note there is a bug in the AdaCore "Compose" function. You should change:

      if not Is_Valid_Path_Name (Containing_Directory) then
         raise Name_Error;

to:

      if Containing_Directory /= "" and
         not Is_Valid_Path_Name (Containing_Directory) then
         raise Name_Error;

I've reported this in Bugzilla yonks ago but no changes in GCC yet, see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21346

Cheers

-- Martin
.



Relevant Pages

  • Re: ANN: compile gcc 3.4.1 How To
    ... Martin Krischik wrote: ... >> What compiler do you use to build ada support for gcc? ... build gnat on gcc 3.3 I can't compile all the tools. ...
    (comp.lang.ada)
  • Re: How to debug?
    ... Store tracebacks in exception occurrences when the target supports it. ... I'm on Windows XP, with GNAT 3.15p. ... Ada, GNAT, the 'p' versions, does not facilitate debugging like e.g. the ...
    (comp.lang.ada)
  • Re: The GNU Ada compiler
    ... > In article, Martin Krischik ... >> The project will supply community compiled binary packages of the GNAT ... I have no private VMS machine and the company VMS clusters have ...
    (comp.lang.ada)
  • Re: GNAT and -fstack-check, does it work?
    ... We are hit by that bug, feature or whatever it is since GNAT 3.15p ... Execution terminated by unhandled exception ... stack overflow ...
    (comp.lang.ada)
  • Re: Teaching new tricks to an old dog (C++ -->Ada)
    ... Martin Krischik wrote: ... > The other example is CORBA. ... in Ada what you throw is ... >> exception. ...
    (comp.lang.ada)