From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, T_FILL_THIS_FORM_SHORT autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,32bee71a8464bfc2,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!z14g2000cwz.googlegroups.com!not-for-mail From: "Adrian Hoe" Newsgroups: comp.lang.ada Subject: A bug in gnat/gcc 3.3.3? Date: 4 Jan 2005 07:58:43 -0800 Organization: http://groups.google.com Message-ID: <1104854323.582074.155390@z14g2000cwz.googlegroups.com> NNTP-Posting-Host: 219.95.189.215 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1104854327 26077 127.0.0.1 (4 Jan 2005 15:58:47 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 4 Jan 2005 15:58:47 +0000 (UTC) User-Agent: G2/0.2 Complaints-To: groups-abuse@google.com Injection-Info: z14g2000cwz.googlegroups.com; posting-host=219.95.189.215; posting-account=LKUaWwwAAABzCo8SD2jIIt5LtkPzH8ot Xref: g2news1.google.com comp.lang.ada:7427 Date: 2005-01-04T07:58:43-08:00 List-Id: Hi and Happy New Year everyone :-), I tried to compile the dgate.adb in GtkAda-2.2.1 with gnat/gcc 3.3.3 under SuSE Linux 9.1 Pro and I got an error: % make dgate gnatmake: objects up to date. make -C glade make[1]: Entering directory `/home/byhoe/download/GtkAda-2.2.1/src/glade' make[1]: Leaving directory `/home/byhoe/download/GtkAda-2.2.1/src/glade' gcc -c -Iglade -O2 -gnatn -gnatws dgate.adb +===========================GNAT BUG DETECTED==============================+ | 3.3.3 (SuSE Linux) (i586-suse-linux-gnu) Gigi abort, Code=411 | | Error detected at dgate.adb:76:48 | | Please submit a bug report; see http://gcc.gnu.org/bugs.html. | | Include the entire contents of this bug box in the report. | | Include the exact gcc or gnatmake command that you entered. | | Also include sources listed below in gnatchop format | | concatenated together with no headers between files. | +==========================================================================+ In dgate.adb ... procedure Register_Signals (N : Node_Ptr) is P : Node_Ptr; Name : String_Ptr; Handler : String_Ptr; S : String_Access; begin if N.Tag.all = "signal" then Name := Get_Field (N, "name"); Handler := Get_Field (N, "handler"); if Name /= null then S := new String '(Name.all & ':' & Handler.all); -- Line 76 -- Col 48 ... In line 128 of dgate.adb, a compilation error indicated that no Init had been defined in package Glade. Below is the full source file for dgate.adb. ----------------------------------------------------------------------- -- DGate - GtkAda Components -- -- -- -- Copyright (C) 1999-2000 -- -- Emmanuel Briot, Joel Brobecker and Arnaud Charlet -- -- -- -- Dynagate is free software; you can redistribute it and/or modify -- -- it under the terms of the GNU General Public License as published -- -- by the Free Software Foundation; either version 2 of the License, -- -- or (at your option) any later version. -- -- -- -- This program is distributed in the hope that it will be useful, -- -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- -- General Public License for more details. You should have received -- -- a copy of the GNU General Public License along with this library; -- -- if not, write to the Free Software Foundation, Inc., 59 Temple -- -- Place - Suite 330, Boston, MA 02111-1307, USA. -- ----------------------------------------------------------------------- -- Parse a Glade's XML project file, declare the required callbacks and -- create the widgets associated with the project file. -- DGate can very easily be used in conjunction with GLADE to test during -- the development. with Ada.Command_Line; use Ada.Command_Line; with Ada.Text_IO; use Ada.Text_IO; with Glib.Glade; with Gtk; use Gtk; with Glade; use Glade; with Glade.XML; use Glade.XML; with Gtk.Main; with DGate_Callbacks; with System; with Unchecked_Conversion; with GNAT.OS_Lib; with GNAT.Command_Line; use GNAT.Command_Line; procedure DGate is use Glib; use Glib.Glade; use Glib.Glade.Glib_XML; package My_Timeout is new Gtk.Main.Timeout (Integer); type String_Access is access all String; for String_Access'Size use Standard'Address_Size; N : Node_Ptr; Id : Gtk.Main.Timeout_Handler_Id; Timeout : Guint32 := 0; Filename : String_Ptr; XML : Glade_XML; function To_Address is new Unchecked_Conversion (String_Access, System.Address); procedure Register_Signals (N : Node_Ptr); -- Call Set_Signal for each signal declared in the N tree. procedure Usage; procedure Register_Signals (N : Node_Ptr) is P : Node_Ptr; Name : String_Ptr; Handler : String_Ptr; S : String_Access; begin if N.Tag.all = "signal" then Name := Get_Field (N, "name"); Handler := Get_Field (N, "handler"); if Name /= null then S := new String '(Name.all & ':' & Handler.all); Signal_Connect (XML, Handler.all, DGate_Callbacks.Generic_Callback'Address, To_Address (S)); return; end if; end if; if N.Child /= null then Register_Signals (N.Child); P := N.Child.Next; while P /= null loop Register_Signals (P); P := P.Next; end loop; end if; end Register_Signals; procedure Usage is begin Ada.Text_IO.Put_Line ("Usage: dgate project-file"); end Usage; begin if Argument_Count = 0 then Usage; else loop case Getopt ("timeout:") is when ASCII.NUL => exit; when 't' => if Full_Switch = "timeout" then Timeout := Guint32'Value (Parameter); else raise Program_Error; end if; when others => raise Program_Error; -- cannot occur! end case; end loop; Filename := new String '(Get_Argument); if not GNAT.OS_Lib.Is_Regular_File (Filename.all) then Put_Line (Filename.all & " is not a regular file"); return; end if; Gtk.Main.Init; -- Glade.Init; -- This line is also generate a compilation error as no Init is defined in package Glade N := Parse (Filename.all); Gtk_New (XML, Filename.all); Register_Signals (N); if Timeout > 0 then -- Let the application run for timeout milliseconds and then quit Id := My_Timeout.Add (Timeout, DGate_Callbacks.Quit'Access, 0); end if; Gtk.Main.Main; end if; exception when Invalid_Switch | Invalid_Parameter => Usage; when others => Put_Line ("DGATE: Internal error. Please send a bug report with the XML"); Put_Line ("file " & Filename.all & " and the GtkAda version to " & "gtkada@ada.eu.org"); end DGate; Does anyone have an idea about this? I would like to clarify things before I submit a bug report to gcc.gnu. Thanks and best regards. -- Adrian Hoe