public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/43863]  New: C++ without exceptions is deficient
@ 2010-04-23  6:54 sebastian dot huber at embedded-brains dot de
  2010-04-23  6:55 ` [Bug c++/43863] " sebastian dot huber at embedded-brains dot de
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: sebastian dot huber at embedded-brains dot de @ 2010-04-23  6:54 UTC (permalink / raw)
  To: gcc-bugs

You can use the configure option

--enable-cxx-flags=-fno-exceptions

to create a C++ compiler without exceptions for the standard C++ library and
the built in new/delete operators.

In some cases you want this to save code space.  Unfortunately this goal cannot
be achieved.  In guard.cc the class __gnu_cxx::recursive_init_error is defined
which pulls in pure.cc via std::exception which depends on the IO libary.


-- 
           Summary: C++ without exceptions is deficient
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: sebastian dot huber at embedded-brains dot de


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


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

* [Bug c++/43863] C++ without exceptions is deficient
  2010-04-23  6:54 [Bug c++/43863] New: C++ without exceptions is deficient sebastian dot huber at embedded-brains dot de
@ 2010-04-23  6:55 ` sebastian dot huber at embedded-brains dot de
  2010-04-23  9:10 ` [Bug libstdc++/43863] " redi at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: sebastian dot huber at embedded-brains dot de @ 2010-04-23  6:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from sebastian dot huber at embedded-brains dot de  2010-04-23 06:55 -------
Created an attachment (id=20468)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20468&action=view)
Proposed changes.

An alternative is to define this class in a separate file.


-- 


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


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

* [Bug libstdc++/43863] C++ without exceptions is deficient
  2010-04-23  6:54 [Bug c++/43863] New: C++ without exceptions is deficient sebastian dot huber at embedded-brains dot de
  2010-04-23  6:55 ` [Bug c++/43863] " sebastian dot huber at embedded-brains dot de
@ 2010-04-23  9:10 ` redi at gcc dot gnu dot org
  2010-04-23  9:28 ` sebastian dot huber at embedded-brains dot de
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: redi at gcc dot gnu dot org @ 2010-04-23  9:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from redi at gcc dot gnu dot org  2010-04-23 09:09 -------
In Bug 43852 I thought you meant building with -fno-exceptions fails, but it
works for me ... do you just mean the resulting library is not as small as it
could be?


-- 


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


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

* [Bug libstdc++/43863] C++ without exceptions is deficient
  2010-04-23  6:54 [Bug c++/43863] New: C++ without exceptions is deficient sebastian dot huber at embedded-brains dot de
  2010-04-23  6:55 ` [Bug c++/43863] " sebastian dot huber at embedded-brains dot de
  2010-04-23  9:10 ` [Bug libstdc++/43863] " redi at gcc dot gnu dot org
@ 2010-04-23  9:28 ` sebastian dot huber at embedded-brains dot de
  2010-04-23  9:36 ` [Bug libstdc++/43863] Unused recursive_init_error class defined with -fno-exceptions redi at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: sebastian dot huber at embedded-brains dot de @ 2010-04-23  9:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from sebastian dot huber at embedded-brains dot de  2010-04-23 09:28 -------
(In reply to comment #2)
> In Bug 43852 I thought you meant building with -fno-exceptions fails, but it
> works for me ... do you just mean the resulting library is not as small as it
> could be?
> 

Sorry for the misunderstanding.  The build works fine, but the library is not
as small as it could be.  This is due to the inclusion of the unused
__gnu_cxx::recursive_init_error class.  For small target systems this is
dramatic.


-- 


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


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

* [Bug libstdc++/43863] Unused recursive_init_error class defined with -fno-exceptions
  2010-04-23  6:54 [Bug c++/43863] New: C++ without exceptions is deficient sebastian dot huber at embedded-brains dot de
                   ` (2 preceding siblings ...)
  2010-04-23  9:28 ` sebastian dot huber at embedded-brains dot de
@ 2010-04-23  9:36 ` redi at gcc dot gnu dot org
  2010-04-23 10:02 ` redi at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: redi at gcc dot gnu dot org @ 2010-04-23  9:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from redi at gcc dot gnu dot org  2010-04-23 09:36 -------
confirmed as an enhancement request


-- 

redi at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2010-04-23 09:36:22
               date|                            |
            Summary|C++ without exceptions is   |Unused recursive_init_error
                   |deficient                   |class defined with -fno-
                   |                            |exceptions


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


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

* [Bug libstdc++/43863] Unused recursive_init_error class defined with -fno-exceptions
  2010-04-23  6:54 [Bug c++/43863] New: C++ without exceptions is deficient sebastian dot huber at embedded-brains dot de
                   ` (3 preceding siblings ...)
  2010-04-23  9:36 ` [Bug libstdc++/43863] Unused recursive_init_error class defined with -fno-exceptions redi at gcc dot gnu dot org
@ 2010-04-23 10:02 ` redi at gcc dot gnu dot org
  2010-04-23 11:00 ` sebastian dot huber at embedded-brains dot de
  2010-06-24 13:44 ` redi at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: redi at gcc dot gnu dot org @ 2010-04-23 10:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from redi at gcc dot gnu dot org  2010-04-23 10:02 -------
Simply removing this class now would break the ABI, which is not acceptable.
If Bug 43852 was resolved by adding a "quiet" mode, would that make this
enhancement unnecessary?  That mode would also change the ABI, but would have
to be explicitly requested by users, and would be documented as changing the
ABI.

Am I right in thinking that putting recursive_init_error in a separate file
would only help when using static linking?


-- 


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


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

* [Bug libstdc++/43863] Unused recursive_init_error class defined with -fno-exceptions
  2010-04-23  6:54 [Bug c++/43863] New: C++ without exceptions is deficient sebastian dot huber at embedded-brains dot de
                   ` (4 preceding siblings ...)
  2010-04-23 10:02 ` redi at gcc dot gnu dot org
@ 2010-04-23 11:00 ` sebastian dot huber at embedded-brains dot de
  2010-06-24 13:44 ` redi at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: sebastian dot huber at embedded-brains dot de @ 2010-04-23 11:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from sebastian dot huber at embedded-brains dot de  2010-04-23 10:59 -------
(In reply to comment #5)
> Simply removing this class now would break the ABI, which is not acceptable.
> If Bug 43852 was resolved by adding a "quiet" mode, would that make this
> enhancement unnecessary?  That mode would also change the ABI, but would have
> to be explicitly requested by users, and would be documented as changing the
> ABI.
> 
> Am I right in thinking that putting recursive_init_error in a separate file
> would only help when using static linking?
> 

Yes, it helps only if you use static linking.

>From my point of view moving this class implementation into a separate
compilation unit would help in case size really matters.  In these situations
you likely use static linking, because otherwise you need a runtime
infrastructure for dynamic linking which is also not that trivial.

If you suppose that users who care about size always choose the "quiet" mode
then this change is virtually unnecessary, but not optimal.


-- 


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


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

* [Bug libstdc++/43863] Unused recursive_init_error class defined with -fno-exceptions
  2010-04-23  6:54 [Bug c++/43863] New: C++ without exceptions is deficient sebastian dot huber at embedded-brains dot de
                   ` (5 preceding siblings ...)
  2010-04-23 11:00 ` sebastian dot huber at embedded-brains dot de
@ 2010-06-24 13:44 ` redi at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: redi at gcc dot gnu dot org @ 2010-06-24 13:44 UTC (permalink / raw)
  To: gcc-bugs



-- 

redi at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |redi at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2010-04-23 09:36:22         |2010-06-24 13:44:10
               date|                            |


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


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

end of thread, other threads:[~2010-06-24 13:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-23  6:54 [Bug c++/43863] New: C++ without exceptions is deficient sebastian dot huber at embedded-brains dot de
2010-04-23  6:55 ` [Bug c++/43863] " sebastian dot huber at embedded-brains dot de
2010-04-23  9:10 ` [Bug libstdc++/43863] " redi at gcc dot gnu dot org
2010-04-23  9:28 ` sebastian dot huber at embedded-brains dot de
2010-04-23  9:36 ` [Bug libstdc++/43863] Unused recursive_init_error class defined with -fno-exceptions redi at gcc dot gnu dot org
2010-04-23 10:02 ` redi at gcc dot gnu dot org
2010-04-23 11:00 ` sebastian dot huber at embedded-brains dot de
2010-06-24 13:44 ` redi at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).