This is the mail archive of the gcc-patches@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]

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


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