public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/11504] New: -Wcast-qual vs. stl_tree
@ 2003-07-11 21:28 bkoz at gcc dot gnu dot org
  2003-07-12  1:23 ` [Bug libstdc++/11504] " pinskia at physics dot uc dot edu
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: bkoz at gcc dot gnu dot org @ 2003-07-11 21:28 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: -Wcast-qual vs. stl_tree
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bkoz at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu

-Wcast-qual cannot now be used with stl_tree.h after 

2003-07-04  Gawain Bolton  <gbolton@free.fr>

	* include/bits/stl_tree.h: Performance and memory usage
	improvements.

See:

http://gcc.gnu.org/ml/libstdc++/2003-07/msg00143.html
http://gcc.gnu.org/ml/libstdc++/2003-07/msg00147.html

Testcase: (use -Wcast-qual)

  #include <set>

  using namespace std;

  set<unsigned,less<unsigned> > V;


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

* [Bug libstdc++/11504] -Wcast-qual vs. stl_tree
  2003-07-11 21:28 [Bug libstdc++/11504] New: -Wcast-qual vs. stl_tree bkoz at gcc dot gnu dot org
@ 2003-07-12  1:23 ` pinskia at physics dot uc dot edu
  2003-07-14 16:53 ` gerald at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-07-12  1:23 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at physics dot uc dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2003-07-12 01:23:52
               date|                            |


------- Additional Comments From pinskia at physics dot uc dot edu  2003-07-12 01:23 -------
I can confirm this on the mainline (20030711), this is annoying behaviour.


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

* [Bug libstdc++/11504] -Wcast-qual vs. stl_tree
  2003-07-11 21:28 [Bug libstdc++/11504] New: -Wcast-qual vs. stl_tree bkoz at gcc dot gnu dot org
  2003-07-12  1:23 ` [Bug libstdc++/11504] " pinskia at physics dot uc dot edu
@ 2003-07-14 16:53 ` gerald at gcc dot gnu dot org
  2003-07-30 15:02 ` cvs-commit at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: gerald at gcc dot gnu dot org @ 2003-07-14 16:53 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


gerald at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gerald at gcc dot gnu dot
                   |                            |org


------- Additional Comments From gerald at gcc dot gnu dot org  2003-07-14 16:53 -------
Here is a more complete testcase, which triggers further warnings:

  #include <set>
  using namespace std;

  typedef set<unsigned,less<unsigned> > S;
  S v;

  void f(const S &w) {
    v.find(2);
    w.find(2);
    }


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

* [Bug libstdc++/11504] -Wcast-qual vs. stl_tree
  2003-07-11 21:28 [Bug libstdc++/11504] New: -Wcast-qual vs. stl_tree bkoz at gcc dot gnu dot org
  2003-07-12  1:23 ` [Bug libstdc++/11504] " pinskia at physics dot uc dot edu
  2003-07-14 16:53 ` gerald at gcc dot gnu dot org
@ 2003-07-30 15:02 ` cvs-commit at gcc dot gnu dot org
  2003-08-23  0:48 ` dhazeghi at yahoo dot com
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-07-30 15:02 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From cvs-commit at gcc dot gnu dot org  2003-07-30 15:02 -------
Subject: Bug 11504

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	bkoz@gcc.gnu.org	2003-07-30 15:01:59

Modified files:
	libstdc++-v3   : ChangeLog 
	libstdc++-v3/config: linker-map.gnu 
	libstdc++-v3/include/bits: stl_tree.h 
	libstdc++-v3/src: stl_tree.cc 

Log message:
	2003-07-30  Gawain Bolton  <gp.bolton@computer.org>
	
	PR libstdc++/11504.
	* include/bits/stl_tree.h: Replace C-style casts with C++-style
	casts.  Changes to avoid casting away constness.  Eliminate
	_Rb_tree_base_iterator class.  Change _Rb_tree_iterator to use
	initialization lists.  Move out implementation of __black_count()
	to...
	* src/stl_tree.cc: ...here and rename _Rb_tree_black_count().
	Rename_Rb_tree_base_iterator::_M_increment() to
	_Rb_tree_increment and _Rb_tree_base_iterator::_M_decrement() to
	_Rb_tree_decrement.
	* config/linker-map.gnu: Add and change symbols here.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&r1=1.1907&r2=1.1908
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/config/linker-map.gnu.diff?cvsroot=gcc&r1=1.45&r2=1.46
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/bits/stl_tree.h.diff?cvsroot=gcc&r1=1.27&r2=1.28
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/src/stl_tree.cc.diff?cvsroot=gcc&r1=1.1&r2=1.2


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

* [Bug libstdc++/11504] -Wcast-qual vs. stl_tree
  2003-07-11 21:28 [Bug libstdc++/11504] New: -Wcast-qual vs. stl_tree bkoz at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2003-07-30 15:02 ` cvs-commit at gcc dot gnu dot org
@ 2003-08-23  0:48 ` dhazeghi at yahoo dot com
  2003-08-23  7:07 ` gerald at pfeifer dot com
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: dhazeghi at yahoo dot com @ 2003-08-23  0:48 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


dhazeghi at yahoo dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  GCC build triplet|i686-pc-linux-gnu           |
   GCC host triplet|i686-pc-linux-gnu           |
 GCC target triplet|i686-pc-linux-gnu           |


------- Additional Comments From dhazeghi at yahoo dot com  2003-08-23 00:47 -------
Patch went in on 7/30. Ben, does this fix your problem?


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

* [Bug libstdc++/11504] -Wcast-qual vs. stl_tree
  2003-07-11 21:28 [Bug libstdc++/11504] New: -Wcast-qual vs. stl_tree bkoz at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2003-08-23  0:48 ` dhazeghi at yahoo dot com
@ 2003-08-23  7:07 ` gerald at pfeifer dot com
  2003-09-01 13:22 ` bkoz at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: gerald at pfeifer dot com @ 2003-08-23  7:07 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From gerald at pfeifer dot com  2003-08-23 07:07 -------
Subject: Re:  -Wcast-qual vs. stl_tree

On Sat, 23 Aug 2003, dhazeghi at yahoo dot com wrote:
> Patch went in on 7/30. Ben, does this fix your problem?

Yes, as far as I (as the original reporter, though not filer of the PR)
can tell.

However, before closing the PR we should make sure that this problem is
now covered by the testsuite.  How about adding -Wcast-qual as a default
option for the entire libstdc++ testsuite?

Gerald


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

* [Bug libstdc++/11504] -Wcast-qual vs. stl_tree
  2003-07-11 21:28 [Bug libstdc++/11504] New: -Wcast-qual vs. stl_tree bkoz at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2003-08-23  7:07 ` gerald at pfeifer dot com
@ 2003-09-01 13:22 ` bkoz at gcc dot gnu dot org
  2003-09-03 12:15 ` bkoz at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: bkoz at gcc dot gnu dot org @ 2003-09-01 13:22 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From bkoz at gcc dot gnu dot org  2003-09-01 13:21 -------
I agree -Wcast-qual should be added to the libstdc++ warning flags.

This could be done in one of three ways, in order of best to worst:

1) add them to all the warning flags when building and testing, by adding it to
WARN_FLAGS in GLIBCXX_EXPORT_FLAGS (in acinclude.m4)

2) add them to --build-cxx in scripts/testsuite_flags.in so that the
g++/libstdc++ runs with it

3) add it to DEFAULT_CXXFLAGS in testsuite/libstdc++-dg/normal.exp so that all
the libstdc++ testruns use it.

best,
benjamin


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

* [Bug libstdc++/11504] -Wcast-qual vs. stl_tree
  2003-07-11 21:28 [Bug libstdc++/11504] New: -Wcast-qual vs. stl_tree bkoz at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2003-09-01 13:22 ` bkoz at gcc dot gnu dot org
@ 2003-09-03 12:15 ` bkoz at gcc dot gnu dot org
  2003-09-18 15:18 ` cvs-commit at gcc dot gnu dot org
  2003-09-23 21:11 ` bkoz at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: bkoz at gcc dot gnu dot org @ 2003-09-03 12:15 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From bkoz at gcc dot gnu dot org  2003-09-03 12:15 -------
Testing this, if it passes on x86/linux I'll check it in.

2003-09-03  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/11504
	* acinclude.m4 (GLIBCXX_EXPORT_FLAGS): Add -Wcast-qual to
	WARN_FLAGS.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

Index: acinclude.m4
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/acinclude.m4,v
retrieving revision 1.269
diff -c -p -r1.269 acinclude.m4
*** acinclude.m4	2 Sep 2003 18:46:46 -0000	1.269
--- acinclude.m4	3 Sep 2003 12:13:51 -0000
*************** AC_DEFUN(GLIBCXX_EXPORT_FLAGS, [
*** 653,659 ****
    OPTIMIZE_CXXFLAGS=
    AC_SUBST(OPTIMIZE_CXXFLAGS)
  
!   WARN_FLAGS='-Wall -Wno-format -W -Wwrite-strings'
    AC_SUBST(WARN_FLAGS)
  ])
  
--- 653,659 ----
    OPTIMIZE_CXXFLAGS=
    AC_SUBST(OPTIMIZE_CXXFLAGS)
  
!   WARN_FLAGS='-Wall -Wno-format -W -Wwrite-strings -Wcast-qual'
    AC_SUBST(WARN_FLAGS)
  ])


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

* [Bug libstdc++/11504] -Wcast-qual vs. stl_tree
  2003-07-11 21:28 [Bug libstdc++/11504] New: -Wcast-qual vs. stl_tree bkoz at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2003-09-03 12:15 ` bkoz at gcc dot gnu dot org
@ 2003-09-18 15:18 ` cvs-commit at gcc dot gnu dot org
  2003-09-23 21:11 ` bkoz at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-09-18 15:18 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From cvs-commit at gcc dot gnu dot org  2003-09-18 14:27 -------
Subject: Bug 11504

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	bkoz@gcc.gnu.org	2003-09-18 14:27:25

Modified files:
	libstdc++-v3   : ChangeLog acinclude.m4 aclocal.m4 configure 

Log message:
	2003-09-18  Benjamin Kosnik  <bkoz@redhat.com>
	
	PR libstdc++/11504
	* acinclude.m4 (GLIBCXX_EXPORT_FLAGS): Add -Wcast-qual to
	WARN_FLAGS, remove -Wno-format.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&r1=1.1961&r2=1.1962
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/acinclude.m4.diff?cvsroot=gcc&r1=1.270&r2=1.271
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/aclocal.m4.diff?cvsroot=gcc&r1=1.283&r2=1.284
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/configure.diff?cvsroot=gcc&r1=1.354&r2=1.355


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

* [Bug libstdc++/11504] -Wcast-qual vs. stl_tree
  2003-07-11 21:28 [Bug libstdc++/11504] New: -Wcast-qual vs. stl_tree bkoz at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2003-09-18 15:18 ` cvs-commit at gcc dot gnu dot org
@ 2003-09-23 21:11 ` bkoz at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: bkoz at gcc dot gnu dot org @ 2003-09-23 21:11 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


bkoz at gcc dot gnu dot org changed:

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


------- Additional Comments From bkoz at gcc dot gnu dot org  2003-09-23 20:24 -------

Fixed.


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

end of thread, other threads:[~2003-09-23 20:24 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-11 21:28 [Bug libstdc++/11504] New: -Wcast-qual vs. stl_tree bkoz at gcc dot gnu dot org
2003-07-12  1:23 ` [Bug libstdc++/11504] " pinskia at physics dot uc dot edu
2003-07-14 16:53 ` gerald at gcc dot gnu dot org
2003-07-30 15:02 ` cvs-commit at gcc dot gnu dot org
2003-08-23  0:48 ` dhazeghi at yahoo dot com
2003-08-23  7:07 ` gerald at pfeifer dot com
2003-09-01 13:22 ` bkoz at gcc dot gnu dot org
2003-09-03 12:15 ` bkoz at gcc dot gnu dot org
2003-09-18 15:18 ` cvs-commit at gcc dot gnu dot org
2003-09-23 21:11 ` bkoz 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).