public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/34680]  New: Unconditional use of dynamic_cast in locale_facets.tcc breaks compilation with -fno-rtti
@ 2008-01-04 23:46 manish at flock dot com
  2008-01-04 23:47 ` [Bug libstdc++/34680] " pinskia at gcc dot gnu dot org
                   ` (19 more replies)
  0 siblings, 20 replies; 21+ messages in thread
From: manish at flock dot com @ 2008-01-04 23:46 UTC (permalink / raw)
  To: gcc-bugs

The fix for PR libstdc++/30127 and PR libstdc++/34449 broke compilation of
files that pull that in, and use -fno-rtti, which was valid in gcc 4.2.2 and
prior.


-- 
           Summary: Unconditional use of dynamic_cast in locale_facets.tcc
                    breaks compilation with -fno-rtti
           Product: gcc
           Version: 4.2.3
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: manish at flock dot com


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


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

* [Bug libstdc++/34680] Unconditional use of dynamic_cast in locale_facets.tcc breaks compilation with -fno-rtti
  2008-01-04 23:46 [Bug libstdc++/34680] New: Unconditional use of dynamic_cast in locale_facets.tcc breaks compilation with -fno-rtti manish at flock dot com
@ 2008-01-04 23:47 ` pinskia at gcc dot gnu dot org
  2008-01-05  0:00 ` manish at flock dot com
                   ` (18 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-01-04 23:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2008-01-04 22:54 -------
I doubt you ever could use STL without RTTI anyways.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|major                       |normal


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


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

* [Bug libstdc++/34680] Unconditional use of dynamic_cast in locale_facets.tcc breaks compilation with -fno-rtti
  2008-01-04 23:46 [Bug libstdc++/34680] New: Unconditional use of dynamic_cast in locale_facets.tcc breaks compilation with -fno-rtti manish at flock dot com
  2008-01-04 23:47 ` [Bug libstdc++/34680] " pinskia at gcc dot gnu dot org
@ 2008-01-05  0:00 ` manish at flock dot com
  2008-01-05  0:02 ` manish at flock dot com
                   ` (17 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: manish at flock dot com @ 2008-01-05  0:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from manish at flock dot com  2008-01-04 23:44 -------
Perhaps I wasn't clear, but this isn't theoretical. Files that *used* to build
with gcc 4.2.2 with -fno-rtti no longer do now.


-- 


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


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

* [Bug libstdc++/34680] Unconditional use of dynamic_cast in locale_facets.tcc breaks compilation with -fno-rtti
  2008-01-04 23:46 [Bug libstdc++/34680] New: Unconditional use of dynamic_cast in locale_facets.tcc breaks compilation with -fno-rtti manish at flock dot com
  2008-01-04 23:47 ` [Bug libstdc++/34680] " pinskia at gcc dot gnu dot org
  2008-01-05  0:00 ` manish at flock dot com
@ 2008-01-05  0:02 ` manish at flock dot com
  2008-01-05  0:04 ` manish at flock dot com
                   ` (16 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: manish at flock dot com @ 2008-01-05  0:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from manish at flock dot com  2008-01-04 23:45 -------
Created an attachment (id=14881)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14881&action=view)
Test case


-- 


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


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

* [Bug libstdc++/34680] Unconditional use of dynamic_cast in locale_facets.tcc breaks compilation with -fno-rtti
  2008-01-04 23:46 [Bug libstdc++/34680] New: Unconditional use of dynamic_cast in locale_facets.tcc breaks compilation with -fno-rtti manish at flock dot com
                   ` (2 preceding siblings ...)
  2008-01-05  0:02 ` manish at flock dot com
@ 2008-01-05  0:04 ` manish at flock dot com
  2008-01-05  5:36 ` pcarlini at suse dot de
                   ` (15 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: manish at flock dot com @ 2008-01-05  0:04 UTC (permalink / raw)
  To: gcc-bugs

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



------- Comment #4 from manish at flock dot com  2008-01-04 23:47 -------
Building the above as follows:

$ g++ -fno-rtti -Os -o testcase testcase.cpp

Results in:

/usr/include/c++/4.2/bits/locale_facets.tcc: In function ‘const _Facet&
std::use_facet(const std::locale&) [with _Facet = std::numpunct<char>]’:
/usr/include/c++/4.2/bits/locale_facets.tcc:193:   instantiated from ‘void
std::__numpunct_cache<_CharT>::_M_cache(const std::locale&) [with _CharT =
char]’
/usr/include/c++/4.2/bits/locale_facets.tcc:146:   instantiated from ‘const
std::__numpunct_cache<_CharT>* std::__use_cache<std::__numpunct_cache<_CharT>
>::operator()(const std::locale&) const [with _CharT = char]’
/usr/include/c++/4.2/bits/locale_facets.tcc:985:   instantiated from ‘_OutIter
std::num_put<_CharT, _OutIter>::_M_insert_int(_OutIter, std::ios_base&, _CharT,
_ValueT) const [with _ValueT = long int, _CharT = char, _OutIter =
std::ostreambuf_iterator<char, std::char_traits<char> >]’
/usr/include/c++/4.2/bits/locale_facets.tcc:1255:   instantiated from ‘_OutIter
std::num_put<_CharT, _OutIter>::do_put(_OutIter, std::ios_base&, _CharT, long
int) const [with _CharT = char, _OutIter = std::ostreambuf_iterator<char,
std::char_traits<char> >]’
/usr/include/c++/4.2/bits/locale_facets.h:2345:   instantiated from ‘_OutIter
std::num_put<_CharT, _OutIter>::put(_OutIter, std::ios_base&, _CharT, long int)
const [with _CharT = char, _OutIter = std::ostreambuf_iterator<char,
std::char_traits<char> >]’
/usr/include/c++/4.2/bits/ostream.tcc:78:   instantiated from
‘std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT,
_Traits>::_M_insert(_ValueT) [with _ValueT = long int, _CharT = char, _Traits =
std::char_traits<char>]’
/usr/include/c++/4.2/bits/ostream.tcc:112:   instantiated from
‘std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT,
_Traits>::operator<<(int) [with _CharT = char, _Traits =
std::char_traits<char>]’
testcase.cpp:6:   instantiated from here
/usr/include/c++/4.2/bits/locale_facets.tcc:118: error: ‘dynamic_cast’ not
permitted with -fno-rtti


-- 


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


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

* [Bug libstdc++/34680] Unconditional use of dynamic_cast in locale_facets.tcc breaks compilation with -fno-rtti
  2008-01-04 23:46 [Bug libstdc++/34680] New: Unconditional use of dynamic_cast in locale_facets.tcc breaks compilation with -fno-rtti manish at flock dot com
                   ` (3 preceding siblings ...)
  2008-01-05  0:04 ` manish at flock dot com
@ 2008-01-05  5:36 ` pcarlini at suse dot de
  2008-01-05  7:52 ` bkoz at gcc dot gnu dot org
                   ` (14 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: pcarlini at suse dot de @ 2008-01-05  5:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from pcarlini at suse dot de  2008-01-05 00:42 -------
I think we should do something about this issue, unfortunately. Because, before
fixing those two bugs, we has essentially *no* dynamic_cast and typeid in the
headers (a few only in TR1).  Presently, I'm thinking we should probably revert
the fix in the branch and think about a solution in mainline: for example a
preprocessor builtin could be elegantly used by the library...


-- 

pcarlini at suse dot de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bkoz at redhat dot com,
                   |                            |pcarlini at suse dot de


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


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

* [Bug libstdc++/34680] Unconditional use of dynamic_cast in locale_facets.tcc breaks compilation with -fno-rtti
  2008-01-04 23:46 [Bug libstdc++/34680] New: Unconditional use of dynamic_cast in locale_facets.tcc breaks compilation with -fno-rtti manish at flock dot com
                   ` (4 preceding siblings ...)
  2008-01-05  5:36 ` pcarlini at suse dot de
@ 2008-01-05  7:52 ` bkoz at gcc dot gnu dot org
  2008-01-05  8:10 ` bkoz at gcc dot gnu dot org
                   ` (13 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: bkoz at gcc dot gnu dot org @ 2008-01-05  7:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from bkoz at gcc dot gnu dot org  2008-01-05 05:21 -------

Agreed. We should remove the offending patch set from 4.2. It's been too
troublesome and we can't do this kind of compile-behavior change on a minor
update to a stable release series.

Oh well.

Probably what needs to happen on mainline is 

-fexceptions and __EXCEPTIONS 

should be used to model something like

-frtti and __RTTI

Then macro solutions are possible in the library.

Or, we could change mainline cc1plus to silently convert dynamic_cast to
static_cast when -fno-rtti. I would actually prefer this solution. 


-- 


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


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

* [Bug libstdc++/34680] Unconditional use of dynamic_cast in locale_facets.tcc breaks compilation with -fno-rtti
  2008-01-04 23:46 [Bug libstdc++/34680] New: Unconditional use of dynamic_cast in locale_facets.tcc breaks compilation with -fno-rtti manish at flock dot com
                   ` (5 preceding siblings ...)
  2008-01-05  7:52 ` bkoz at gcc dot gnu dot org
@ 2008-01-05  8:10 ` bkoz at gcc dot gnu dot org
  2008-01-05 11:02 ` pcarlini at suse dot de
                   ` (12 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: bkoz at gcc dot gnu dot org @ 2008-01-05  8:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from bkoz at gcc dot gnu dot org  2008-01-05 05:40 -------

Just as an aside, the GCC manual for -fno-rtti seems to be incorrect:

http://gcc.gnu.org/onlinedocs/gcc/C_002b_002b-Dialect-Options.html#C_002b_002b-Dialect-Options

The `dynamic_cast' operator can still be used for casts that do not require
runtime type information, i.e. casts to void * or to unambiguous base classes. 

Did this behavior change recently? Hmmm.


-- 


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


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

* [Bug libstdc++/34680] Unconditional use of dynamic_cast in locale_facets.tcc breaks compilation with -fno-rtti
  2008-01-04 23:46 [Bug libstdc++/34680] New: Unconditional use of dynamic_cast in locale_facets.tcc breaks compilation with -fno-rtti manish at flock dot com
                   ` (6 preceding siblings ...)
  2008-01-05  8:10 ` bkoz at gcc dot gnu dot org
@ 2008-01-05 11:02 ` pcarlini at suse dot de
  2008-01-05 11:06 ` pcarlini at suse dot de
                   ` (11 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: pcarlini at suse dot de @ 2008-01-05 11:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from pcarlini at suse dot de  2008-01-05 10:23 -------
(In reply to comment #6)
> Agreed. We should remove the offending patch set from 4.2. It's been too
> troublesome and we can't do this kind of compile-behavior change on a minor
> update to a stable release series.

Agreed.

> Oh well.
> 
> Probably what needs to happen on mainline is 
> 
> -fexceptions and __EXCEPTIONS 
> 
> should be used to model something like
> 
> -frtti and __RTTI
> 
> Then macro solutions are possible in the library.
> 
> Or, we could change mainline cc1plus to silently convert dynamic_cast to
> static_cast when -fno-rtti. I would actually prefer this solution. 

Yes, I would also like the latter solution, a lot. But whereas I could
reasonably quickly implement myself the latter, I'm not at all sure about the
former and I'm not even sure the C++ front-end maintainers agree with the idea
itself :( I'm adding Mark and Jason in CC, to have feedback, also about the
good point you are raising in the next message.


-- 

pcarlini at suse dot de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at redhat dot com,
                   |                            |mark at codesourcery dot com


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


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

* [Bug libstdc++/34680] Unconditional use of dynamic_cast in locale_facets.tcc breaks compilation with -fno-rtti
  2008-01-04 23:46 [Bug libstdc++/34680] New: Unconditional use of dynamic_cast in locale_facets.tcc breaks compilation with -fno-rtti manish at flock dot com
                   ` (8 preceding siblings ...)
  2008-01-05 11:06 ` pcarlini at suse dot de
@ 2008-01-05 11:06 ` pcarlini at suse dot de
  2008-01-05 11:20 ` paolo at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: pcarlini at suse dot de @ 2008-01-05 11:06 UTC (permalink / raw)
  To: gcc-bugs



-- 

pcarlini at suse dot de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2008-01-05 10:27:55
               date|                            |


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


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

* [Bug libstdc++/34680] Unconditional use of dynamic_cast in locale_facets.tcc breaks compilation with -fno-rtti
  2008-01-04 23:46 [Bug libstdc++/34680] New: Unconditional use of dynamic_cast in locale_facets.tcc breaks compilation with -fno-rtti manish at flock dot com
                   ` (7 preceding siblings ...)
  2008-01-05 11:02 ` pcarlini at suse dot de
@ 2008-01-05 11:06 ` pcarlini at suse dot de
  2008-01-05 11:06 ` pcarlini at suse dot de
                   ` (10 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: pcarlini at suse dot de @ 2008-01-05 11:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from pcarlini at suse dot de  2008-01-05 10:25 -------
(In reply to comment #8)
>                                                          But whereas I could
> reasonably quickly implement myself the latter, I'm not at all sure about the
> former

Of course read it the other way round, sorry.


-- 


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


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

* [Bug libstdc++/34680] Unconditional use of dynamic_cast in locale_facets.tcc breaks compilation with -fno-rtti
  2008-01-04 23:46 [Bug libstdc++/34680] New: Unconditional use of dynamic_cast in locale_facets.tcc breaks compilation with -fno-rtti manish at flock dot com
                   ` (9 preceding siblings ...)
  2008-01-05 11:06 ` pcarlini at suse dot de
@ 2008-01-05 11:20 ` paolo at gcc dot gnu dot org
  2008-01-05 14:08 ` [Bug libstdc++/34680] [4.3 Regression] " pinskia at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: paolo at gcc dot gnu dot org @ 2008-01-05 11:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from paolo at gcc dot gnu dot org  2008-01-05 11:05 -------
Subject: Bug 34680

Author: paolo
Date: Sat Jan  5 11:04:43 2008
New Revision: 131334

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=131334
Log:
2008-01-05  Paolo Carlini  <pcarlini@suse.de>

        PR libstdc++/34680

        Revert:
        2007-12-17  Jonathan Wakely  <jwakely.gcc@gmail.com>
        * include/bits/locale_facets.tcc (has_facet, use_facet): Simplify
        RTTI checks.

        2007-12-14  Benjamin Kosnik  <bkoz@redhat.com>

        PR libstdc++/30127
        PR libstdc++/34449
        * include/bits/locale_facets.tcc (use_facet): Check facet hierarchy.
        (has_facet): Same.
        * testsuite/22_locale/global_templates/user_facet_hierarchies.cc: New.
        * testsuite/22_locale/global_templates/
        standard_facet_hierarchies.cc: New.

Removed:
   
branches/gcc-4_2-branch/libstdc++-v3/testsuite/22_locale/global_templates/standard_facet_hierarchies.cc
   
branches/gcc-4_2-branch/libstdc++-v3/testsuite/22_locale/global_templates/user_facet_hierarchies.cc
Modified:
    branches/gcc-4_2-branch/libstdc++-v3/ChangeLog
    branches/gcc-4_2-branch/libstdc++-v3/include/bits/locale_facets.tcc


-- 


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


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

* [Bug libstdc++/34680] [4.3 Regression] Unconditional use of dynamic_cast in locale_facets.tcc breaks compilation with -fno-rtti
  2008-01-04 23:46 [Bug libstdc++/34680] New: Unconditional use of dynamic_cast in locale_facets.tcc breaks compilation with -fno-rtti manish at flock dot com
                   ` (10 preceding siblings ...)
  2008-01-05 11:20 ` paolo at gcc dot gnu dot org
@ 2008-01-05 14:08 ` pinskia at gcc dot gnu dot org
  2008-01-05 23:47 ` pcarlini at suse dot de
                   ` (7 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-01-05 14:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from pinskia at gcc dot gnu dot org  2008-01-05 12:08 -------
(In reply to comment #6)
> Or, we could change mainline cc1plus to silently convert dynamic_cast to
> static_cast when -fno-rtti. I would actually prefer this solution. 

No because this was just fixed to be an error for 4.2.0, see PR 10891.


-- 


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


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

* [Bug libstdc++/34680] [4.3 Regression] Unconditional use of dynamic_cast in locale_facets.tcc breaks compilation with -fno-rtti
  2008-01-04 23:46 [Bug libstdc++/34680] New: Unconditional use of dynamic_cast in locale_facets.tcc breaks compilation with -fno-rtti manish at flock dot com
                   ` (11 preceding siblings ...)
  2008-01-05 14:08 ` [Bug libstdc++/34680] [4.3 Regression] " pinskia at gcc dot gnu dot org
@ 2008-01-05 23:47 ` pcarlini at suse dot de
  2008-01-06 20:06 ` mmitchel at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: pcarlini at suse dot de @ 2008-01-05 23:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from pcarlini at suse dot de  2008-01-05 23:13 -------
I see... Therefore, apparently we don't have many options...


-- 


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


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

* [Bug libstdc++/34680] [4.3 Regression] Unconditional use of dynamic_cast in locale_facets.tcc breaks compilation with -fno-rtti
  2008-01-04 23:46 [Bug libstdc++/34680] New: Unconditional use of dynamic_cast in locale_facets.tcc breaks compilation with -fno-rtti manish at flock dot com
                   ` (12 preceding siblings ...)
  2008-01-05 23:47 ` pcarlini at suse dot de
@ 2008-01-06 20:06 ` mmitchel at gcc dot gnu dot org
  2008-01-06 20:32 ` pcarlini at suse dot de
                   ` (5 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2008-01-06 20:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from mmitchel at gcc dot gnu dot org  2008-01-06 19:35 -------
I'm not keen on silently changing dynamic_cast to static_cast.  But, with
-fno-rtti, making dynamic_cast<void*> and static casts work seems OK.  Does
that not work now?

And, certainly, adding preprocessor macros (__GNU_CXX_EXCEPTIONS,
__GNU_CXX_RTTI) to indicate whether or not exceptions and RTTI are turned on or
not seems like a good idea.


-- 


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


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

* [Bug libstdc++/34680] [4.3 Regression] Unconditional use of dynamic_cast in locale_facets.tcc breaks compilation with -fno-rtti
  2008-01-04 23:46 [Bug libstdc++/34680] New: Unconditional use of dynamic_cast in locale_facets.tcc breaks compilation with -fno-rtti manish at flock dot com
                   ` (13 preceding siblings ...)
  2008-01-06 20:06 ` mmitchel at gcc dot gnu dot org
@ 2008-01-06 20:32 ` pcarlini at suse dot de
  2008-01-06 23:12 ` paolo at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: pcarlini at suse dot de @ 2008-01-06 20:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #14 from pcarlini at suse dot de  2008-01-06 20:05 -------
(In reply to comment #13)
> I'm not keen on silently changing dynamic_cast to static_cast.  But, with
> -fno-rtti, making dynamic_cast<void*> and static casts work seems OK.  Does
> that not work now?

Yes, I checked, and that works.

> And, certainly, adding preprocessor macros (__GNU_CXX_EXCEPTIONS,
> __GNU_CXX_RTTI) to indicate whether or not exceptions and RTTI are turned on or
> not seems like a good idea.

Great. We can use that for a library-only solution. Today I posted a patch, we
already have __EXCEPTIONS, and, for the new one, I choosen __GXX_RTTI
consistently with other existing C++ only predefine macros, if you would rather
prefer __GNU_CXX_RTTI, just let me know...


-- 


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


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

* [Bug libstdc++/34680] [4.3 Regression] Unconditional use of dynamic_cast in locale_facets.tcc breaks compilation with -fno-rtti
  2008-01-04 23:46 [Bug libstdc++/34680] New: Unconditional use of dynamic_cast in locale_facets.tcc breaks compilation with -fno-rtti manish at flock dot com
                   ` (14 preceding siblings ...)
  2008-01-06 20:32 ` pcarlini at suse dot de
@ 2008-01-06 23:12 ` paolo at gcc dot gnu dot org
  2008-01-07 12:20 ` paolo at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: paolo at gcc dot gnu dot org @ 2008-01-06 23:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #15 from paolo at gcc dot gnu dot org  2008-01-06 22:31 -------
Subject: Bug 34680

Author: paolo
Date: Sun Jan  6 22:30:32 2008
New Revision: 131366

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=131366
Log:
gcc/
2008-01-06  Paolo Carlini  <pcarlini@suse.de>

        PR libstdc++/34680
        * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_RTTI, if appropriate.
        * doc/cpp.texi ([Common Predefined Macros]): Document.

gcc/testsuite/
2008-01-06  Paolo Carlini  <pcarlini@suse.de>

        PR libstdc++/34680
        * g++.dg/rtti/predefined-rtti-macro-1.C: New.
        * g++.dg/rtti/predefined-rtti-macro-2.C: Likewise.

Added:
    trunk/gcc/testsuite/g++.dg/rtti/predefined-rtti-macro-1.C
    trunk/gcc/testsuite/g++.dg/rtti/predefined-rtti-macro-2.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/c-cppbuiltin.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug libstdc++/34680] [4.3 Regression] Unconditional use of dynamic_cast in locale_facets.tcc breaks compilation with -fno-rtti
  2008-01-04 23:46 [Bug libstdc++/34680] New: Unconditional use of dynamic_cast in locale_facets.tcc breaks compilation with -fno-rtti manish at flock dot com
                   ` (15 preceding siblings ...)
  2008-01-06 23:12 ` paolo at gcc dot gnu dot org
@ 2008-01-07 12:20 ` paolo at gcc dot gnu dot org
  2008-01-07 12:47 ` pcarlini at suse dot de
                   ` (2 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: paolo at gcc dot gnu dot org @ 2008-01-07 12:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #16 from paolo at gcc dot gnu dot org  2008-01-07 11:11 -------
Subject: Bug 34680

Author: paolo
Date: Mon Jan  7 11:11:02 2008
New Revision: 131372

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=131372
Log:
2008-01-07  Paolo Carlini  <pcarlini@suse.de>

        PR libstdc++/34680
        * include/bits/locale_classes.h (has_facet<>, use_facet<>): Do not
        use dynamic_cast when run-time type identification is disabled; do
        not mark inline; only declare, define...
        * include/bits/locale_classes.tcc: ... here.

Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/include/bits/locale_classes.h
    trunk/libstdc++-v3/include/bits/locale_classes.tcc


-- 


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


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

* [Bug libstdc++/34680] [4.3 Regression] Unconditional use of dynamic_cast in locale_facets.tcc breaks compilation with -fno-rtti
  2008-01-04 23:46 [Bug libstdc++/34680] New: Unconditional use of dynamic_cast in locale_facets.tcc breaks compilation with -fno-rtti manish at flock dot com
                   ` (16 preceding siblings ...)
  2008-01-07 12:20 ` paolo at gcc dot gnu dot org
@ 2008-01-07 12:47 ` pcarlini at suse dot de
  2008-01-07 13:02 ` pcarlini at suse dot de
  2008-01-07 21:50 ` paolo at gcc dot gnu dot org
  19 siblings, 0 replies; 21+ messages in thread
From: pcarlini at suse dot de @ 2008-01-07 12:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #17 from pcarlini at suse dot de  2008-01-07 11:12 -------
Fixed.


-- 

pcarlini at suse dot de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.2.3


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


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

* [Bug libstdc++/34680] [4.3 Regression] Unconditional use of dynamic_cast in locale_facets.tcc breaks compilation with -fno-rtti
  2008-01-04 23:46 [Bug libstdc++/34680] New: Unconditional use of dynamic_cast in locale_facets.tcc breaks compilation with -fno-rtti manish at flock dot com
                   ` (17 preceding siblings ...)
  2008-01-07 12:47 ` pcarlini at suse dot de
@ 2008-01-07 13:02 ` pcarlini at suse dot de
  2008-01-07 21:50 ` paolo at gcc dot gnu dot org
  19 siblings, 0 replies; 21+ messages in thread
From: pcarlini at suse dot de @ 2008-01-07 13:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #18 from pcarlini at suse dot de  2008-01-07 11:14 -------
.


-- 

pcarlini at suse dot de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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


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

* [Bug libstdc++/34680] [4.3 Regression] Unconditional use of dynamic_cast in locale_facets.tcc breaks compilation with -fno-rtti
  2008-01-04 23:46 [Bug libstdc++/34680] New: Unconditional use of dynamic_cast in locale_facets.tcc breaks compilation with -fno-rtti manish at flock dot com
                   ` (18 preceding siblings ...)
  2008-01-07 13:02 ` pcarlini at suse dot de
@ 2008-01-07 21:50 ` paolo at gcc dot gnu dot org
  19 siblings, 0 replies; 21+ messages in thread
From: paolo at gcc dot gnu dot org @ 2008-01-07 21:50 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #19 from paolo at gcc dot gnu dot org  2008-01-07 20:55 -------
Subject: Bug 34680

Author: paolo
Date: Mon Jan  7 20:54:49 2008
New Revision: 131382

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=131382
Log:
2008-01-06  Paolo Carlini  <pcarlini@suse.de>

        PR libstdc++/34680
        * doc/cpp.texi ([Common Predefined Macros]): Document.



Modified:
    trunk/gcc/doc/cpp.texi


-- 


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


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

end of thread, other threads:[~2008-01-07 20:56 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-04 23:46 [Bug libstdc++/34680] New: Unconditional use of dynamic_cast in locale_facets.tcc breaks compilation with -fno-rtti manish at flock dot com
2008-01-04 23:47 ` [Bug libstdc++/34680] " pinskia at gcc dot gnu dot org
2008-01-05  0:00 ` manish at flock dot com
2008-01-05  0:02 ` manish at flock dot com
2008-01-05  0:04 ` manish at flock dot com
2008-01-05  5:36 ` pcarlini at suse dot de
2008-01-05  7:52 ` bkoz at gcc dot gnu dot org
2008-01-05  8:10 ` bkoz at gcc dot gnu dot org
2008-01-05 11:02 ` pcarlini at suse dot de
2008-01-05 11:06 ` pcarlini at suse dot de
2008-01-05 11:06 ` pcarlini at suse dot de
2008-01-05 11:20 ` paolo at gcc dot gnu dot org
2008-01-05 14:08 ` [Bug libstdc++/34680] [4.3 Regression] " pinskia at gcc dot gnu dot org
2008-01-05 23:47 ` pcarlini at suse dot de
2008-01-06 20:06 ` mmitchel at gcc dot gnu dot org
2008-01-06 20:32 ` pcarlini at suse dot de
2008-01-06 23:12 ` paolo at gcc dot gnu dot org
2008-01-07 12:20 ` paolo at gcc dot gnu dot org
2008-01-07 12:47 ` pcarlini at suse dot de
2008-01-07 13:02 ` pcarlini at suse dot de
2008-01-07 21:50 ` paolo 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).