Hi Paolo, >>This is already documented: >> >>http://gcc.gnu.org/onlinedocs/libstdc++/manual/source_code_style.html#coding_style.bad_identifiers > > Indeed. As a simple to remember rule never use single underscore + single > uppercase. Usually we add a p, like _Cp, etc. Plenty of examples > everywhere. At the moment I can't do the search&replace, any such patch is > preapproved though.
I wasn't certain about the right convention. The following patch allowed bootstrap to finish on i386-pc-solaris2.10 and x86_64-unknown-linux-gnu. I'll commit the patch once Solaris testing has finished. 2013-08-08 Rainer Orth <r...@cebitec.uni-bielefeld.de> * include/bits/regex.h: Replace _A, _B, _C, _R by _Ap, _Bp, _Cp, _Rp.
diff --git a/libstdc++-v3/include/bits/regex.h b/libstdc++-v3/include/bits/regex.h --- a/libstdc++-v3/include/bits/regex.h +++ b/libstdc++-v3/include/bits/regex.h @@ -995,18 +995,18 @@ namespace std _GLIBCXX_VISIBILITY(defaul const basic_regex<_CharT, _TraitsT>&, regex_constants::match_flag_type); - template<typename _B, typename _A, typename _C, typename _R> + template<typename _Bp, typename _Ap, typename _Cp, typename _Rp> friend bool - regex_match(_B, _B, - match_results<_B, _A>&, - const basic_regex<_C, _R>&, + regex_match(_Bp, _Bp, + match_results<_Bp, _Ap>&, + const basic_regex<_Cp, _Rp>&, regex_constants::match_flag_type); - template<typename _B, typename _A, typename _C, typename _R> + template<typename _Bp, typename _Ap, typename _Cp, typename _Rp> friend bool - regex_search(_B, _B, - match_results<_B, _A>&, - const basic_regex<_C, _R>&, + regex_search(_Bp, _Bp, + match_results<_Bp, _Ap>&, + const basic_regex<_Cp, _Rp>&, regex_constants::match_flag_type); flag_type _M_flags; @@ -2111,16 +2111,16 @@ namespace std _GLIBCXX_VISIBILITY(defaul template<typename, typename, typename, typename> friend class __detail::_BFSExecutor; - template<typename _B, typename _A, typename _Ch_type, typename _Rx_traits> + template<typename _Bp, typename _Ap, typename _Ch_type, typename _Rx_traits> friend bool - regex_match(_B, _B, match_results<_B, _A>&, + regex_match(_Bp, _Bp, match_results<_Bp, _Ap>&, const basic_regex<_Ch_type, _Rx_traits>&, regex_constants::match_flag_type); - template<typename _B, typename _A, typename _Ch_type, typename _Rx_traits> + template<typename _Bp, typename _Ap, typename _Ch_type, typename _Rx_traits> friend bool - regex_search(_B, _B, match_results<_B, _A>&, + regex_search(_Bp, _Bp, match_results<_Bp, _Ap>&, const basic_regex<_Ch_type, _Rx_traits>&, regex_constants::match_flag_type);
However, I see many 32-bit testsuite failures, both on Solaris and Linux: Running target unix/-m32 FAIL: 28_regex/algorithms/regex_match/basic/string_01.cc (test for excess errors) WARNING: 28_regex/algorithms/regex_match/basic/string_01.cc compilation failed to produce executable FAIL: 28_regex/algorithms/regex_match/basic/string_range_00_03.cc (test for excess errors) WARNING: 28_regex/algorithms/regex_match/basic/string_range_00_03.cc compilation failed to produce executable FAIL: 28_regex/algorithms/regex_match/basic/string_range_01_03.cc (test for excess errors) WARNING: 28_regex/algorithms/regex_match/basic/string_range_01_03.cc compilation failed to produce executable FAIL: 28_regex/algorithms/regex_match/basic/string_range_02_03.cc (test for excess errors) WARNING: 28_regex/algorithms/regex_match/basic/string_range_02_03.cc compilation failed to produce executable FAIL: 28_regex/algorithms/regex_match/extended/53622.cc (test for excess errors) WARNING: 28_regex/algorithms/regex_match/extended/53622.cc compilation failed to produce executable FAIL: 28_regex/algorithms/regex_match/extended/57173.cc (test for excess errors) WARNING: 28_regex/algorithms/regex_match/extended/57173.cc compilation failed to produce executable FAIL: 28_regex/algorithms/regex_match/extended/cstring_bracket_01.cc (test for excess errors) WARNING: 28_regex/algorithms/regex_match/extended/cstring_bracket_01.cc compilation failed to produce executable FAIL: 28_regex/algorithms/regex_match/extended/cstring_plus.cc (test for excess errors) WARNING: 28_regex/algorithms/regex_match/extended/cstring_plus.cc compilation failed to produce executable FAIL: 28_regex/algorithms/regex_match/extended/cstring_questionmark.cc (test for excess errors) WARNING: 28_regex/algorithms/regex_match/extended/cstring_questionmark.cc compilation failed to produce executable FAIL: 28_regex/algorithms/regex_match/extended/string_any.cc (test for excess errors) WARNING: 28_regex/algorithms/regex_match/extended/string_any.cc compilation failed to produce executable FAIL: 28_regex/algorithms/regex_match/extended/string_range_00_03.cc (test for excess errors) WARNING: 28_regex/algorithms/regex_match/extended/string_range_00_03.cc compilation failed to produce executable FAIL: 28_regex/algorithms/regex_match/extended/string_range_01_03.cc (test for excess errors) WARNING: 28_regex/algorithms/regex_match/extended/string_range_01_03.cc compilation failed to produce executable FAIL: 28_regex/algorithms/regex_match/extended/string_range_02_03.cc (test for excess errors) WARNING: 28_regex/algorithms/regex_match/extended/string_range_02_03.cc compilation failed to produce executable FAIL: 28_regex/algorithms/regex_search/basic/string_01.cc (test for excess errors) WARNING: 28_regex/algorithms/regex_search/basic/string_01.cc compilation failed to produce executable FAIL: 28_regex/basic_regex/ctors/basic/cstring.cc (test for excess errors) FAIL: 28_regex/basic_regex/ctors/basic/raw_string.cc (test for excess errors) WARNING: 28_regex/basic_regex/ctors/basic/raw_string.cc compilation failed to produce executable FAIL: 28_regex/basic_regex/ctors/basic/string_range_01_02_03.cc (test for excess errors) WARNING: 28_regex/basic_regex/ctors/basic/string_range_01_02_03.cc compilation failed to produce executable FAIL: 28_regex/basic_regex/ctors/char/cstring_awk.cc (test for excess errors) FAIL: 28_regex/basic_regex/ctors/char/cstring_egrep.cc (test for excess errors) FAIL: 28_regex/basic_regex/ctors/char/cstring_grep.cc (test for excess errors) FAIL: 28_regex/basic_regex/ctors/extended/cstring.cc (test for excess errors) FAIL: 28_regex/basic_regex/ctors/extended/string_range_01_02_03.cc (test for excess errors) WARNING: 28_regex/basic_regex/ctors/extended/string_range_01_02_03.cc compilation failed to produce executable E.g. the first one is FAIL: 28_regex/algorithms/regex_match/basic/string_01.cc (test for excess errors) Excess errors: /vol/gcc/src/hg/trunk/local/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/basic/string_01.cc:34:47: error: call of overloaded 'basic_regex(const char [8], const flag_type&)' is ambiguous The other failures are similar. Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University