public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/64276] New: would be better to use __cpp_exceptions rather than __EXCEPTIONS to determine whether exceptions are available
@ 2014-12-11 19:41 richard-gccbugzilla at metafoo dot co.uk
2014-12-12 3:50 ` [Bug libstdc++/64276] " pinskia at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: richard-gccbugzilla at metafoo dot co.uk @ 2014-12-11 19:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64276
Bug ID: 64276
Summary: would be better to use __cpp_exceptions rather than
__EXCEPTIONS to determine whether exceptions are
available
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: richard-gccbugzilla at metafoo dot co.uk
CC: redi at gcc dot gnu.org
libstdc++ uses __EXCEPTIONS to determine wither exceptions are available, and
uses __GXX_RTTI to determine if RTTI is available. __EXCEPTIONS is ambiguous;
it can mean either "generate cleanups on exception unwind paths" or "allow C++
exception handling syntax", and some compilers allow these flags to be set
independently. It would be more portable (and would set a better example) to
use __cpp_exceptions and __cpp_rtti rather than these macros, now that GCC
supports them.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libstdc++/64276] would be better to use __cpp_exceptions rather than __EXCEPTIONS to determine whether exceptions are available
2014-12-11 19:41 [Bug libstdc++/64276] New: would be better to use __cpp_exceptions rather than __EXCEPTIONS to determine whether exceptions are available richard-gccbugzilla at metafoo dot co.uk
@ 2014-12-12 3:50 ` pinskia at gcc dot gnu.org
2014-12-12 7:52 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2014-12-12 3:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64276
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I don't think it matters as libstdc++ is only designed to be compiled with gcc.
In fact if used with another compiler, the runtime exception no longer applies.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libstdc++/64276] would be better to use __cpp_exceptions rather than __EXCEPTIONS to determine whether exceptions are available
2014-12-11 19:41 [Bug libstdc++/64276] New: would be better to use __cpp_exceptions rather than __EXCEPTIONS to determine whether exceptions are available richard-gccbugzilla at metafoo dot co.uk
2014-12-12 3:50 ` [Bug libstdc++/64276] " pinskia at gcc dot gnu.org
@ 2014-12-12 7:52 ` jakub at gcc dot gnu.org
2014-12-12 11:26 ` redi at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-12-12 7:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64276
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
A Compilation Process is "Eligible" if it is done using GCC, alone or
with other GPL-compatible software, or if it is done without using any
work based on GCC. For example, using non-GPL-compatible Software to
optimize any GCC intermediate representations would not qualify as an
Eligible Compilation Process.
so I think you're wrong on this, the runtime exception can be used even when
code is compiled by other compilers, if they aren't based on GCC.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libstdc++/64276] would be better to use __cpp_exceptions rather than __EXCEPTIONS to determine whether exceptions are available
2014-12-11 19:41 [Bug libstdc++/64276] New: would be better to use __cpp_exceptions rather than __EXCEPTIONS to determine whether exceptions are available richard-gccbugzilla at metafoo dot co.uk
2014-12-12 3:50 ` [Bug libstdc++/64276] " pinskia at gcc dot gnu.org
2014-12-12 7:52 ` jakub at gcc dot gnu.org
@ 2014-12-12 11:26 ` redi at gcc dot gnu.org
2014-12-12 15:59 ` redi at gcc dot gnu.org
2014-12-12 16:00 ` redi at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2014-12-12 11:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64276
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2014-12-12
Assignee|unassigned at gcc dot gnu.org |redi at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
There is no reason not to make this change, __cpp_exceptions is the portable,
WG21-recommended way to tell if the compiler supports try/catch.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libstdc++/64276] would be better to use __cpp_exceptions rather than __EXCEPTIONS to determine whether exceptions are available
2014-12-11 19:41 [Bug libstdc++/64276] New: would be better to use __cpp_exceptions rather than __EXCEPTIONS to determine whether exceptions are available richard-gccbugzilla at metafoo dot co.uk
` (2 preceding siblings ...)
2014-12-12 11:26 ` redi at gcc dot gnu.org
@ 2014-12-12 15:59 ` redi at gcc dot gnu.org
2014-12-12 16:00 ` redi at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2014-12-12 15:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64276
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Fri Dec 12 15:58:49 2014
New Revision: 218679
URL: https://gcc.gnu.org/viewcvs?rev=218679&root=gcc&view=rev
Log:
PR libstdc++/64276
* doc/doxygen/user.cfg.in: Define __cpp_exceptions and __cpp_rtti.
* doc/html/manual/using_exceptions.html: Regenerate.
* doc/xml/manual/using_exceptions.xml: Use SD-6 feature-testing
macros, __cpp_exceptions and __cpp_rtti, instead of __EXCEPTIONS and
__GXX_RTTI.
* include/bits/c++config: Likewise.
* include/bits/locale_classes.tcc: Likewise.
* include/bits/shared_ptr.h: Likewise.
* include/bits/shared_ptr_base.h: Likewise.
* include/debug/formatter.h: Likewise.
* include/experimental/any: Likewise.
* include/ext/rope: Likewise.
* include/ext/ropeimpl.h: Likewise.
* include/std/functional: Likewise.
* include/tr1/functional: Likewise.
* include/tr1/shared_ptr.h: Likewise.
* libsupc++/eh_call.cc: Likewise.
* libsupc++/eh_personality.cc: Likewise.
* libsupc++/exception_defines.h: Likewise.
* libsupc++/exception_ptr.h: Likewise.
* libsupc++/guard.cc: Likewise.
* libsupc++/pbase_type_info.cc: Likewise.
* libsupc++/pointer_type_info.cc: Likewise.
* libsupc++/vterminate.cc: Likewise.
* src/c++11/thread.cc: Likewise.
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/doc/doxygen/user.cfg.in
trunk/libstdc++-v3/doc/html/manual/using_exceptions.html
trunk/libstdc++-v3/doc/xml/manual/using_exceptions.xml
trunk/libstdc++-v3/include/bits/c++config
trunk/libstdc++-v3/include/bits/locale_classes.tcc
trunk/libstdc++-v3/include/bits/shared_ptr.h
trunk/libstdc++-v3/include/bits/shared_ptr_base.h
trunk/libstdc++-v3/include/debug/formatter.h
trunk/libstdc++-v3/include/experimental/any
trunk/libstdc++-v3/include/ext/rope
trunk/libstdc++-v3/include/ext/ropeimpl.h
trunk/libstdc++-v3/include/std/functional
trunk/libstdc++-v3/include/tr1/functional
trunk/libstdc++-v3/include/tr1/shared_ptr.h
trunk/libstdc++-v3/libsupc++/eh_call.cc
trunk/libstdc++-v3/libsupc++/eh_personality.cc
trunk/libstdc++-v3/libsupc++/exception_defines.h
trunk/libstdc++-v3/libsupc++/exception_ptr.h
trunk/libstdc++-v3/libsupc++/guard.cc
trunk/libstdc++-v3/libsupc++/pbase_type_info.cc
trunk/libstdc++-v3/libsupc++/pointer_type_info.cc
trunk/libstdc++-v3/libsupc++/vterminate.cc
trunk/libstdc++-v3/src/c++11/thread.cc
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libstdc++/64276] would be better to use __cpp_exceptions rather than __EXCEPTIONS to determine whether exceptions are available
2014-12-11 19:41 [Bug libstdc++/64276] New: would be better to use __cpp_exceptions rather than __EXCEPTIONS to determine whether exceptions are available richard-gccbugzilla at metafoo dot co.uk
` (3 preceding siblings ...)
2014-12-12 15:59 ` redi at gcc dot gnu.org
@ 2014-12-12 16:00 ` redi at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2014-12-12 16:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64276
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
Target Milestone|--- |5.0
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Done.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-12-12 16:00 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-11 19:41 [Bug libstdc++/64276] New: would be better to use __cpp_exceptions rather than __EXCEPTIONS to determine whether exceptions are available richard-gccbugzilla at metafoo dot co.uk
2014-12-12 3:50 ` [Bug libstdc++/64276] " pinskia at gcc dot gnu.org
2014-12-12 7:52 ` jakub at gcc dot gnu.org
2014-12-12 11:26 ` redi at gcc dot gnu.org
2014-12-12 15:59 ` redi at gcc dot gnu.org
2014-12-12 16:00 ` redi at gcc dot gnu.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).