* GNAT quirk
@ 2007-08-03 12:23 Jerry
2007-08-03 20:05 ` Ludovic Brenta
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Jerry @ 2007-08-03 12:23 UTC (permalink / raw)
procedure bad is
a : Long_Float := 3.0;
begin
for i in 1 .. Integer(Long_Float'Truncation(a)) loop
null;
end loop;
end bad;
bad.adb:4:37: unimplemented attribute
gnatmake: "bad.adb" compilation error
procedure good is
begin
for i in 1 .. Integer(Long_Float'Truncation(2.0)) loop
null;
end loop;
end good;
Compiles OK.
procedure gooder is
a : Long_Float := 2.0;
idum : Integer;
begin
idum := Integer(Long_Float'Truncation(a));
for i in 1 .. idum loop
null;
end loop;
end gooder;
Compiles OK.
Jerry
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: GNAT quirk
2007-08-03 12:23 GNAT quirk Jerry
@ 2007-08-03 20:05 ` Ludovic Brenta
2007-08-03 21:25 ` Jerry
2007-08-03 23:27 ` Compiles OK? " anon
2007-08-11 2:36 ` Nasser Abbasi
2 siblings, 1 reply; 5+ messages in thread
From: Ludovic Brenta @ 2007-08-03 20:05 UTC (permalink / raw)
Nice bug report. Have you submitted it to http://gcc.gnu.org/bugzilla ?
--
Ludovic Brenta.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: GNAT quirk
2007-08-03 20:05 ` Ludovic Brenta
@ 2007-08-03 21:25 ` Jerry
0 siblings, 0 replies; 5+ messages in thread
From: Jerry @ 2007-08-03 21:25 UTC (permalink / raw)
On Aug 3, 1:05 pm, Ludovic Brenta <ludo...@ludovic-brenta.org> wrote:
> Nice bug report. Have you submitted it tohttp://gcc.gnu.org/bugzilla?
>
> --
> Ludovic Brenta.
Done--thanks. I needed at least two more eyeballs on it, and wasn't
sure where to report.
Jerry
^ permalink raw reply [flat|nested] 5+ messages in thread
* Compiles OK? Re: GNAT quirk
2007-08-03 12:23 GNAT quirk Jerry
2007-08-03 20:05 ` Ludovic Brenta
@ 2007-08-03 23:27 ` anon
2007-08-11 2:36 ` Nasser Abbasi
2 siblings, 0 replies; 5+ messages in thread
From: anon @ 2007-08-03 23:27 UTC (permalink / raw)
Say What?
Compiling: test5.adb (source file time stamp: 2007-08-02 18:36:46)
1. procedure test5 is
2.
3. procedure bad is
4. a : Long_Float := 3.0;
5. begin
6. for i in 1 .. Integer(Long_Float'Truncation(a)) loop
7. null;
8. end loop;
9. end bad;
10.
11. procedure good is
12. begin
13. for i in 1 .. Integer(Long_Float'Truncation(2.0)) loop
14. null;
15. end loop;
16. end good;
17.
18.
19. procedure gooder is
20. a : Long_Float := 2.0;
21. idum : Integer;
22. begin
23. idum := Integer(Long_Float'Truncation(a));
24. for i in 1 .. idum loop
25. null;
26. end loop;
27. end gooder;
28.
29. begin
30. null ;
31. end ;
31 lines: No errors
In <1186143806.109608.153890@m37g2000prh.googlegroups.com>, Jerry <lanceboyle@qwest.net> writes:
>procedure bad is
> a : Long_Float := 3.0;
>begin
> for i in 1 .. Integer(Long_Float'Truncation(a)) loop
> null;
> end loop;
>end bad;
>
>bad.adb:4:37: unimplemented attribute
>gnatmake: "bad.adb" compilation error
>
>
>
>procedure good is
>begin
> for i in 1 .. Integer(Long_Float'Truncation(2.0)) loop
> null;
> end loop;
>end good;
>
>Compiles OK.
>
>
>
>procedure gooder is
> a : Long_Float := 2.0;
> idum : Integer;
>begin
> idum := Integer(Long_Float'Truncation(a));
> for i in 1 .. idum loop
> null;
> end loop;
>end gooder;
>
>Compiles OK.
>
>Jerry
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: GNAT quirk
2007-08-03 12:23 GNAT quirk Jerry
2007-08-03 20:05 ` Ludovic Brenta
2007-08-03 23:27 ` Compiles OK? " anon
@ 2007-08-11 2:36 ` Nasser Abbasi
2 siblings, 0 replies; 5+ messages in thread
From: Nasser Abbasi @ 2007-08-11 2:36 UTC (permalink / raw)
"Jerry" <lanceboyle@qwest.net> wrote in message
news:1186143806.109608.153890@m37g2000prh.googlegroups.com...
> procedure bad is
> a : Long_Float := 3.0;
> begin
> for i in 1 .. Integer(Long_Float'Truncation(a)) loop
> null;
> end loop;
> end bad;
>
> bad.adb:4:37: unimplemented attribute
> gnatmake: "bad.adb" compilation error
>
>
fyi, this compiles fine in gnat 2007.
Nasser
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-08-11 2:36 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-03 12:23 GNAT quirk Jerry
2007-08-03 20:05 ` Ludovic Brenta
2007-08-03 21:25 ` Jerry
2007-08-03 23:27 ` Compiles OK? " anon
2007-08-11 2:36 ` Nasser Abbasi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox