This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] fix compile warnings in libstdc++
- From: Dirk Mueller <dmueller at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Tue, 13 Feb 2007 01:09:54 +0100
- Subject: [PATCH] fix compile warnings in libstdc++
Hi,
I need the patch below to avoid the warning about ambiguous else as triggered
by mainline for quite a while.
bootstrapped on i686-suse-linux. Ok?
Thanks,
Dirk
2007-02-13 Dirk Mueller <dmueller@suse.de>
* include/bits/locale_facets.tcc: Fix warning about ambiguous-else.
--- include/bits/locale_facets.tcc (revision 121864)
+++ include/bits/locale_facets.tcc (working copy)
@@ -746,16 +746,20 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE
const char_type __c = *__beg;
if (__testf)
- if (__n < __lc->_M_falsename_size)
- __testf = __c == __lc->_M_falsename[__n];
- else
- break;
+ {
+ if (__n < __lc->_M_falsename_size)
+ __testf = __c == __lc->_M_falsename[__n];
+ else
+ break;
+ }
if (__testt)
- if (__n < __lc->_M_truename_size)
- __testt = __c == __lc->_M_truename[__n];
- else
- break;
+ {
+ if (__n < __lc->_M_truename_size)
+ __testt = __c == __lc->_M_truename[__n];
+ else
+ break;
+ }
if (!__testf && !__testt)
break;