comp.lang.ada
 help / color / mirror / Atom feed
* GNAT Compiler-Bug?
@ 1997-09-09  0:00 Stefan Muehlebach
  1997-09-10  0:00 ` Pascal Obry
  1997-09-11  0:00 ` Robert Dewar
  0 siblings, 2 replies; 3+ messages in thread
From: Stefan Muehlebach @ 1997-09-09  0:00 UTC (permalink / raw)



I tried to compile the X11/Motif-binding from Intermetrics with the new
GNAT-Compiler 3.09.
At the File 'xt-intrinsic.ads' the following error message appeared:

xt-intrinsic.ads:447:05: warning: no more representation items for type
"XtConvertArgRec" defined at line 198
xt-intrinsic.ads:2799:05: representation item appears too late
gnatmake: "xt-intrinsic.adb" compilation error

With the old version (3.05) I had no such problems.
To solve it, I just moved the instruction from line 2799 (it was a
'pragma'-statement) up to line 199 and - voila - everything went right.

Could one of the GNAT-Gurus give me a answer to this problem?

S. Muehlebach

-- Stefan Muehlebach
-- ia94mueh@htl-bw.ch
-- Technical University of Brugg-Windisch, Switzerland





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: GNAT Compiler-Bug?
  1997-09-09  0:00 GNAT Compiler-Bug? Stefan Muehlebach
@ 1997-09-10  0:00 ` Pascal Obry
  1997-09-11  0:00 ` Robert Dewar
  1 sibling, 0 replies; 3+ messages in thread
From: Pascal Obry @ 1997-09-10  0:00 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 989 bytes --]


Stefan,

 GNAT 3.09 is right about this. It was a bug in GNAT 3.05. The rule is that
a representation clause *must* appear before the type is frozen.

You're fix seem good to me.

Hope this help,
Pascal.

--

--|------------------------------------------------------------
--| Pascal Obry                               Team-Ada Member |
--|                                                           |
--| EDF-DER-IPN-SID- Ing�nierie des Syst�mes d'Informations   |
--|                                                           |
--| Bureau G1-010           e-mail: pascal.obry@der.edfgdf.fr |
--| 1 Av G�n�ral de Gaulle  voice : +33-1-47.65.50.91         |
--| 92141 Clamart CEDEX     fax   : +33-1-47.65.50.07         |
--| FRANCE                                                    |
--|------------------------------------------------------------
--|
--|   http://ourworld.compuserve.com/homepages/pascal_obry
--|
--|   "The best way to travel is by means of imagination"







^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: GNAT Compiler-Bug?
  1997-09-09  0:00 GNAT Compiler-Bug? Stefan Muehlebach
  1997-09-10  0:00 ` Pascal Obry
@ 1997-09-11  0:00 ` Robert Dewar
  1 sibling, 0 replies; 3+ messages in thread
From: Robert Dewar @ 1997-09-11  0:00 UTC (permalink / raw)



Stefan says

<<xt-intrinsic.ads:447:05: warning: no more representation items for type
"XtConvertArgRec" defined at line 198
xt-intrinsic.ads:2799:05: representation item appears too late
gnatmake: "xt-intrinsic.adb" compilation error

With the old version (3.05) I had no such problems.
To solve it, I just moved the instruction from line 2799 (it was a
'pragma'-statement) up to line 199 and - voila - everything went right.

Could one of the GNAT-Gurus give me a answer to this problem?>>


There is no problem here. The code you quote is illegal, your fix is
the appropriate fix, and GNAT 3.05 had a bug, it did not detect the
illegality, and this bug was fixed nearly a year ago.





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1997-09-11  0:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-09-09  0:00 GNAT Compiler-Bug? Stefan Muehlebach
1997-09-10  0:00 ` Pascal Obry
1997-09-11  0:00 ` Robert Dewar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox