Bug 44431 - [boot with C++] Conflicting exit declaration in ada/b_gnatb.c
Summary: [boot with C++] Conflicting exit declaration in ada/b_gnatb.c
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: ada (show other bugs)
Version: 4.6.0
: P3 normal
Target Milestone: 4.7.0
Assignee: Not yet assigned to anyone
URL:
Keywords: build
: 46574 (view as bug list)
Depends on:
Blocks: 44433
  Show dependency treegraph
 
Reported: 2010-06-06 11:48 UTC by Richard Biener
Modified: 2018-07-08 22:14 UTC (History)
6 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2011-03-07 08:47:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Biener 2010-06-06 11:48:04 UTC
With --enable-build-with-cxx I see

In file included from ada/b_gnatb.c:252:
ada/b_gnatb.c:5: error: previous declaration of 'void exit(int)' with 'C++' linkage
/usr/include/stdlib.h:543: error: conflicts with new declaration with 'C' linkage
/usr/include/stdlib.h:543: error: declaration of 'void exit(int) throw ()' throws different exceptions
ada/b_gnatb.c:5: error: from previous declaration 'void exit(int)'
Comment 1 Laurent GUERBY 2010-06-06 12:35:04 UTC
The Ada language build issues were all adressed by my patch on june 2009 here:

http://gcc.gnu.org/ml/gcc/2009-06/msg00635.html

The patch for your problem is the gcc/ada/gcc-interface/Makefile.in change to use -A instead of -C for gnatbind.

As I said in the last message of the discussion there are a few choice to make to do the switch to be able to use C++ and an Ada maintainer needs to step in now.
Comment 2 rguenther@suse.de 2010-06-06 12:41:59 UTC
Subject: Re:  [boot with C++] Conflicting exit declaration in
 ada/b_gnatb.c

On Sun, 6 Jun 2010, laurent at guerby dot net wrote:

> ------- Comment #1 from laurent at guerby dot net  2010-06-06 12:35 -------
> The Ada language build issues were all adressed by my patch on june 2009 here:
> 
> http://gcc.gnu.org/ml/gcc/2009-06/msg00635.html
> 
> The patch for your problem is the gcc/ada/gcc-interface/Makefile.in change to
> use -A instead of -C for gnatbind.
> 
> As I said in the last message of the discussion there are a few choice to make
> to do the switch to be able to use C++ and an Ada maintainer needs to step in
> now.

All other languages work fine with C++ now.
Comment 3 Eric Botcazou 2010-06-06 14:16:14 UTC
> The patch for your problem is the gcc/ada/gcc-interface/Makefile.in change to
> use -A instead of -C for gnatbind.
> 
> As I said in the last message of the discussion there are a few choice to make
> to do the switch to be able to use C++ and an Ada maintainer needs to step in
> now.

The -C mode for gnatbind is to be deprecated so we'll need to make the switch in any cases.  Let's wait for Arno's take on this.
Comment 4 Eric Botcazou 2010-11-27 19:09:09 UTC
*** Bug 46574 has been marked as a duplicate of this bug. ***
Comment 5 Serge Belyshev 2011-03-07 08:51:30 UTC
Still fails the same way.
Comment 6 gingold@gcc.gnu.org 2011-03-28 09:49:14 UTC
Author: gingold
Date: Mon Mar 28 09:49:10 2011
New Revision: 171593

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=171593
Log:
2011-03-28  Tristan Gingold  <gingold@adacore.com>

	PR ada/44431
	* gcc-interface/Make-lang.in (ada/b_gnat1.adb):  Replaces
	ada/b_gnat1.c. Use ada output of gnatbind.
	(ada/b_gnatb.adb): Ditto.
	(ada/b_gnat1.o, ada/b_gnatb.o): New rules.
	(ada.mostlyclean, ada.stage1)
	(ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
	(ada.stagefeedback): Adjust.

	* gcc-interface/Makefile.in (b_gnatl.adb): Replaces b_gnatl.c
	Use ada output of gnatbind.
	(b_gnatm.adb): Ditto.
	(b_gnatl.o, b_gnatm.o): New rules.


Modified:
    trunk/gcc/ada/ChangeLog
    trunk/gcc/ada/gcc-interface/Make-lang.in
    trunk/gcc/ada/gcc-interface/Makefile.in
Comment 7 Eric Botcazou 2011-03-28 09:53:27 UTC
Presumably.  Reopen if not.