public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/16896] New: [3.4/3.5 Regression] Use of non-reserved names in stl_list.h
@ 2004-08-06 10:32 peturr02 at ru dot is
  2004-08-06 10:35 ` [Bug libstdc++/16896] " peturr02 at ru dot is
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: peturr02 at ru dot is @ 2004-08-06 10:32 UTC (permalink / raw)
  To: gcc-bugs

In include/bits/stl_list.h:

  struct _List_node_base
  {
    _List_node_base* _M_next;   ///< Self-explanatory
    _List_node_base* _M_prev;   ///< Self-explanatory

    static void
    swap(_List_node_base& __x, _List_node_base& __y);

    void
    transfer(_List_node_base * const __first,
             _List_node_base * const __last);

    void
    reverse();

    void
    hook(_List_node_base * const __position);

    void
    unhook();
  };

The names transfer, hook and unhook don't appear in the C++ standard, and are
not in the implementors namespace. They can therefore clash with user-defined
macros.

-- 
           Summary: [3.4/3.5 Regression] Use of non-reserved names in
                    stl_list.h
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: peturr02 at ru dot is
                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


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


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

* [Bug libstdc++/16896] [3.4/3.5 Regression] Use of non-reserved names in stl_list.h
  2004-08-06 10:32 [Bug libstdc++/16896] New: [3.4/3.5 Regression] Use of non-reserved names in stl_list.h peturr02 at ru dot is
@ 2004-08-06 10:35 ` peturr02 at ru dot is
  2004-08-06 10:49 ` pcarlini at suse dot de
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: peturr02 at ru dot is @ 2004-08-06 10:35 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From peturr02 at ru dot is  2004-08-06 10:35 -------
Created an attachment (id=6893)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6893&action=view)
Test case

This test case #defines transfer, hook and unhook before #including <list>.

This works fine with 3.2 and 3.3, but blows up with 3.4 and mainline:

g++341 -Wall  -static  1.cc   -o 1
In file included from
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.1/include/c++/list:71,
		 from 1.cc:5:
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.1/include/c++/bits/stl_list.h:83:
error: expected unqualified-id before numeric constant
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.1/include/c++/bits/stl_list.h:90:
error: expected unqualified-id before numeric constant
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.1/include/c++/bits/stl_list.h:93:
error: expected unqualified-id before numeric constant
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.1/include/c++/bits/stl_list.h: In
member function `void std::list<_Tp,
_Alloc>::_M_transfer(std::_List_iterator<_Tp>, std::_List_iterator<_Tp>,
std::_List_iterator<_Tp>)':
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.1/include/c++/bits/stl_list.h:1155:
error: expected unqualified-id before numeric constant
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.1/include/c++/bits/stl_list.h:1155:
error: expected `;' before numeric constant
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.1/include/c++/bits/stl_list.h: In
member function `void std::list<_Tp,
_Alloc>::_M_insert(std::_List_iterator<_Tp>, const _Tp&)':
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.1/include/c++/bits/stl_list.h:1162:
error: expected unqualified-id before numeric constant
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.1/include/c++/bits/stl_list.h:1162:
error: expected `;' before numeric constant
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.1/include/c++/bits/stl_list.h: In
member function `void std::list<_Tp,
_Alloc>::_M_erase(std::_List_iterator<_Tp>)':
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.1/include/c++/bits/stl_list.h:1169:
error: expected unqualified-id before numeric constant
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.1/include/c++/bits/stl_list.h:1169:
error: expected `;' before numeric constant
In file included from
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.1/include/c++/list:74,
		 from 1.cc:5:
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.1/include/c++/bits/list.tcc: In member
function `typename std::list<_Tp, _Alloc>::iterator std::list<_Tp,
_Alloc>::insert(std::_List_iterator<_Tp>, const _Tp&)':
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.1/include/c++/bits/list.tcc:88: error:
expected unqualified-id before numeric constant
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.1/include/c++/bits/list.tcc:88: error:
expected `;' before numeric constant
make: *** [1] Error 1


-- 


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


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

* [Bug libstdc++/16896] [3.4/3.5 Regression] Use of non-reserved names in stl_list.h
  2004-08-06 10:32 [Bug libstdc++/16896] New: [3.4/3.5 Regression] Use of non-reserved names in stl_list.h peturr02 at ru dot is
  2004-08-06 10:35 ` [Bug libstdc++/16896] " peturr02 at ru dot is
  2004-08-06 10:49 ` pcarlini at suse dot de
@ 2004-08-06 10:49 ` pcarlini at suse dot de
  2004-08-06 15:51 ` pcarlini at suse dot de
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pcarlini at suse dot de @ 2004-08-06 10:49 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |3.4.2


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


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

* [Bug libstdc++/16896] [3.4/3.5 Regression] Use of non-reserved names in stl_list.h
  2004-08-06 10:32 [Bug libstdc++/16896] New: [3.4/3.5 Regression] Use of non-reserved names in stl_list.h peturr02 at ru dot is
  2004-08-06 10:35 ` [Bug libstdc++/16896] " peturr02 at ru dot is
@ 2004-08-06 10:49 ` pcarlini at suse dot de
  2004-08-06 10:49 ` pcarlini at suse dot de
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pcarlini at suse dot de @ 2004-08-06 10:49 UTC (permalink / raw)
  To: gcc-bugs

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


------- Additional Comments From pcarlini at suse dot de  2004-08-06 10:49 -------
Thanks Pétur, I'm fixing it everywhere.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |pcarlini at suse dot de
                   |dot org                     |
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-08-06 10:49:12
               date|                            |


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


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

* [Bug libstdc++/16896] [3.4/3.5 Regression] Use of non-reserved names in stl_list.h
  2004-08-06 10:32 [Bug libstdc++/16896] New: [3.4/3.5 Regression] Use of non-reserved names in stl_list.h peturr02 at ru dot is
                   ` (2 preceding siblings ...)
  2004-08-06 10:49 ` pcarlini at suse dot de
@ 2004-08-06 15:51 ` pcarlini at suse dot de
  2004-08-06 16:49 ` peturr02 at ru dot is
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pcarlini at suse dot de @ 2004-08-06 15:51 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pcarlini at suse dot de  2004-08-06 15:51 -------
Unfortunately, we can't fix it in 3.4.x without breaking the ABI :(

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.4.2                       |---


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


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

* [Bug libstdc++/16896] [3.4/3.5 Regression] Use of non-reserved names in stl_list.h
  2004-08-06 10:32 [Bug libstdc++/16896] New: [3.4/3.5 Regression] Use of non-reserved names in stl_list.h peturr02 at ru dot is
                   ` (3 preceding siblings ...)
  2004-08-06 15:51 ` pcarlini at suse dot de
@ 2004-08-06 16:49 ` peturr02 at ru dot is
  2004-08-06 16:59 ` pcarlini at suse dot de
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: peturr02 at ru dot is @ 2004-08-06 16:49 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From peturr02 at ru dot is  2004-08-06 16:49 -------
> Unfortunately, we can't fix it in 3.4.x without breaking the ABI

Hmmm... Isn't it possible to change the header file, but still export under
the old name using __attribute__(alias)?


-- 


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


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

* [Bug libstdc++/16896] [3.4/3.5 Regression] Use of non-reserved names in stl_list.h
  2004-08-06 10:32 [Bug libstdc++/16896] New: [3.4/3.5 Regression] Use of non-reserved names in stl_list.h peturr02 at ru dot is
                   ` (4 preceding siblings ...)
  2004-08-06 16:49 ` peturr02 at ru dot is
@ 2004-08-06 16:59 ` pcarlini at suse dot de
  2004-08-10 20:58 ` pcarlini at suse dot de
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pcarlini at suse dot de @ 2004-08-06 16:59 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pcarlini at suse dot de  2004-08-06 16:59 -------
... perhaps, thanks for the idea. This stuff is also in list.cc, of course,
does this make the problem worse?

-- 


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


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

* [Bug libstdc++/16896] [3.4/3.5 Regression] Use of non-reserved names in stl_list.h
  2004-08-06 10:32 [Bug libstdc++/16896] New: [3.4/3.5 Regression] Use of non-reserved names in stl_list.h peturr02 at ru dot is
                   ` (5 preceding siblings ...)
  2004-08-06 16:59 ` pcarlini at suse dot de
@ 2004-08-10 20:58 ` pcarlini at suse dot de
  2004-08-24 17:03 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pcarlini at suse dot de @ 2004-08-10 20:58 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pcarlini at suse dot de  2004-08-10 20:58 -------
Small update: according to this kind reply:

  http://gcc.gnu.org/ml/gcc/2004-08/msg00303.html

using __attribute__(alias) seems rather tricky, unfortunately.
I'm afraid we'll able to fix the bug only if/when/where we decide to break the
3.4 ABI, sigh.

-- 


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


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

* [Bug libstdc++/16896] [3.4/3.5 Regression] Use of non-reserved names in stl_list.h
  2004-08-06 10:32 [Bug libstdc++/16896] New: [3.4/3.5 Regression] Use of non-reserved names in stl_list.h peturr02 at ru dot is
                   ` (6 preceding siblings ...)
  2004-08-10 20:58 ` pcarlini at suse dot de
@ 2004-08-24 17:03 ` cvs-commit at gcc dot gnu dot org
  2004-12-08 20:46 ` [Bug libstdc++/16896] [3.4/4.0 " pinskia at gcc dot gnu dot org
  2004-12-30 15:16 ` [Bug libstdc++/16896] " pcarlini at suse dot de
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-08-24 17:03 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-08-24 17:03 -------
Subject: Bug 16896

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	libstdcxx_so_7-branch
Changes by:	paolo@gcc.gnu.org	2004-08-24 17:03:01

Modified files:
	libstdc++-v3   : ChangeLog.libstdcxx_so_7-branch configure 
	                 configure.ac 
	libstdc++-v3/include/bits: stl_list.h list.tcc 
	libstdc++-v3/src: list.cc 
	libstdc++-v3/config: linker-map.gnu 
	libstdc++-v3/testsuite: testsuite_abi.cc 
Added files:
	libstdc++-v3/testsuite/23_containers/list: 16896.cc 

Log message:
	2004-08-24  Paolo Carlini  <pcarlini@suse.de>
	
	PR libstdc++/16896
	* include/bits/stl_list.h (struct _List_node_base): Rename the
	transfer member to _M_transfer, hook to _M_hook, and unhook to
	_M_unhook.
	* include/bits/list.tcc (list<>::insert): Tweak consistently.
	* src/list.cc: Change consistently.
	* config/linker-map.gnu: Likewise.
	* testsuite/23_containers/list/16896.cc: New.
	
	* include/bits/stl_list.h: Trivial formatting fixes.
	
	* config/linker-map.gnu: Move everything in GLIBCXX_3.4, 3.4.1
	and 3.4.2 under GLIBCXX_3.6.
	* testsuite/testsuite_abi.cc: Add GLIBCXX_3.6.
	* configure.ac (libtool_VERSION): Bump to 7:0:0.
	* configure: Regenerate.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.libstdcxx_so_7-branch.diff?cvsroot=gcc&only_with_tag=libstdcxx_so_7-branch&r1=1.1.2.4&r2=1.1.2.5
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/configure.diff?cvsroot=gcc&only_with_tag=libstdcxx_so_7-branch&r1=1.384.4.2&r2=1.384.4.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/configure.ac.diff?cvsroot=gcc&only_with_tag=libstdcxx_so_7-branch&r1=1.18.4.2&r2=1.18.4.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/bits/stl_list.h.diff?cvsroot=gcc&only_with_tag=libstdcxx_so_7-branch&r1=1.40.2.1&r2=1.40.2.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/bits/list.tcc.diff?cvsroot=gcc&only_with_tag=libstdcxx_so_7-branch&r1=1.15.2.1&r2=1.15.2.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/src/list.cc.diff?cvsroot=gcc&only_with_tag=libstdcxx_so_7-branch&r1=1.2&r2=1.2.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/config/linker-map.gnu.diff?cvsroot=gcc&only_with_tag=libstdcxx_so_7-branch&r1=1.59.2.1&r2=1.59.2.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/23_containers/list/16896.cc.diff?cvsroot=gcc&only_with_tag=libstdcxx_so_7-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/testsuite_abi.cc.diff?cvsroot=gcc&only_with_tag=libstdcxx_so_7-branch&r1=1.4.8.1&r2=1.4.8.2



-- 


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


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

* [Bug libstdc++/16896] [3.4/4.0 Regression] Use of non-reserved names in stl_list.h
  2004-08-06 10:32 [Bug libstdc++/16896] New: [3.4/3.5 Regression] Use of non-reserved names in stl_list.h peturr02 at ru dot is
                   ` (7 preceding siblings ...)
  2004-08-24 17:03 ` cvs-commit at gcc dot gnu dot org
@ 2004-12-08 20:46 ` pinskia at gcc dot gnu dot org
  2004-12-30 15:16 ` [Bug libstdc++/16896] " pcarlini at suse dot de
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-08 20:46 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.1.0


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


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

* [Bug libstdc++/16896] Use of non-reserved names in stl_list.h
  2004-08-06 10:32 [Bug libstdc++/16896] New: [3.4/3.5 Regression] Use of non-reserved names in stl_list.h peturr02 at ru dot is
                   ` (8 preceding siblings ...)
  2004-12-08 20:46 ` [Bug libstdc++/16896] [3.4/4.0 " pinskia at gcc dot gnu dot org
@ 2004-12-30 15:16 ` pcarlini at suse dot de
  9 siblings, 0 replies; 11+ messages in thread
From: pcarlini at suse dot de @ 2004-12-30 15:16 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pcarlini at suse dot de  2004-12-30 15:16 -------
*** Bug 19209 has been marked as a duplicate of this bug. ***

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


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


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

end of thread, other threads:[~2004-12-30 15:16 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-06 10:32 [Bug libstdc++/16896] New: [3.4/3.5 Regression] Use of non-reserved names in stl_list.h peturr02 at ru dot is
2004-08-06 10:35 ` [Bug libstdc++/16896] " peturr02 at ru dot is
2004-08-06 10:49 ` pcarlini at suse dot de
2004-08-06 10:49 ` pcarlini at suse dot de
2004-08-06 15:51 ` pcarlini at suse dot de
2004-08-06 16:49 ` peturr02 at ru dot is
2004-08-06 16:59 ` pcarlini at suse dot de
2004-08-10 20:58 ` pcarlini at suse dot de
2004-08-24 17:03 ` cvs-commit at gcc dot gnu dot org
2004-12-08 20:46 ` [Bug libstdc++/16896] [3.4/4.0 " pinskia at gcc dot gnu dot org
2004-12-30 15:16 ` [Bug libstdc++/16896] " pcarlini at suse dot de

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).