This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/16896] [3.4/3.5 Regression] Use of non-reserved names in stl_list.h


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]