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/14665] gnatmake invokes wrong cross tools


------- Additional Comments From charlet at act-europe dot fr  2004-04-01 15:09 -------
Subject: Re:  gnatmake invokes wrong cross tools

> Is this more what you had in mind?  If so, please commit this.

Closer.

There's still a style issue with

         if To_Lower (Command_Name (Cindex2)) = 'e'
            and then To_Lower (Command_Name (Cindex2 - 1)) = 'x'
            and then To_Lower (Command_Name (Cindex2 - 2)) = 'e'
            and then To_Lower (Command_Name (Cindex2 - 3)) = '.' then
            Cindex2 := Cindex2 - 4;
         end if;

Should be:

         if To_Lower (Command_Name (Cindex2)) = 'e'
           and then To_Lower (Command_Name (Cindex2 - 1)) = 'x'
           and then To_Lower (Command_Name (Cindex2 - 2)) = 'e'
           and then To_Lower (Command_Name (Cindex2 - 3)) = '.'
         then
            Cindex2 := Cindex2 - 4;
         end if;

Although doing the comparison backwards is misleading, so I'd compare
it forward instead as well:

         if Cindex2 - Cindex1 >= 4
           and then To_Lower (Command_Name (Cindex2 - 3)) = '.'
           and then To_Lower (Command_Name (Cindex2 - 2)) = 'e'
           and then To_Lower (Command_Name (Cindex2 - 1)) = 'x'
           and then To_Lower (Command_Name (Cindex2)) = 'e'
         then
            Cindex2 := Cindex2 - 4;
         end if;

I can't commit your change, since you haven't submitted a changelog.
Also I don't have time to test this change, so please do the change above and
test your change.

Arno


-- 


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


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