]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Thu, 17 May 2001 07:11:00 +0000 (07:11 +0000)
committerUlrich Drepper <drepper@redhat.com>
Thu, 17 May 2001 07:11:00 +0000 (07:11 +0000)
2001-05-14  Bruno Haible  <haible@clisp.cons.org>

* iconvdata/iso-2022-cn-ext.c (BODY for FROM_LOOP): If SO is seen
without previous announcement, reject it regularly, don't abort.

2001-05-16  Ulrich Drepper  <drepper@redhat.com>

* math/tgmath.h: Fix handling of int parameters to binary and
ternary functions.  Reported by mitr@volny.cz.

* math/test-tgmath.c: Add tests for calls with integer parameters.

* manual/llio.texi: Many grammar and typo fixes to the section on AIO.

ChangeLog
iconvdata/iso-2022-cn-ext.c
math/test-tgmath.c
math/tgmath.h

index 3a19eefd03e7ba2a45f74e2973075895dcbfe24c..6638b34eddd8fcb69cac307c14f1f92fde7cbe25 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2001-05-14  Bruno Haible  <haible@clisp.cons.org>
+
+       * iconvdata/iso-2022-cn-ext.c (BODY for FROM_LOOP): If SO is seen
+       without previous announcement, reject it regularly, don't abort.
+
+2001-05-16  Ulrich Drepper  <drepper@redhat.com>
+
+       * math/tgmath.h: Fix handling of int parameters to binary and
+       ternary functions.  Reported by mitr@volny.cz.
+
+       * math/test-tgmath.c: Add tests for calls with integer parameters.
+
 2001-05-15  Jakub Jelinek  <jakub@redhat.com>
 
        * sunrpc/rpc_thread.c (rpc_default): Remove.
@@ -13,8 +25,7 @@
 
 2001-05-16  Bruce Mitchener  <bruce@cubik.org>
 
-       * manual/llio.texi:  Many grammar and typo fixes to the section
-       on AIO.
+       * manual/llio.texi: Many grammar and typo fixes to the section on AIO.
 
 2001-05-15  Andreas Jaeger  <aj@suse.de>
 
index d6ab2e8bbe8de9f5727005029ecb54a0c8757f2a..ab8a988550c694d0c8caa8f27cd27dec65388907 100644 (file)
@@ -260,21 +260,33 @@ enum
           XXX For now I'll default to use GB2312.  If this is not the        \
           best behavior (e.g., we should flag an error) let me know.  */     \
        ++inptr;                                                              \
-       switch (ann & SO_ann)                                                 \
+       if ((ann & SO_ann) != 0)                                              \
+         switch (ann & SO_ann)                                               \
+           {                                                                 \
+           case GB2312_ann:                                                  \
+             set = GB2312_set;                                               \
+             break;                                                          \
+           case GB12345_ann:                                                 \
+             set = GB12345_set;                                              \
+             break;                                                          \
+           case CNS11643_1_ann:                                              \
+             set = CNS11643_1_set;                                           \
+             break;                                                          \
+           case ISO_IR_165_ann:                                              \
+             set = ISO_IR_165_set;                                           \
+             break;                                                          \
+           default:                                                          \
+             abort ();                                                       \
+           }                                                                 \
+       else                                                                  \
          {                                                                   \
-         case GB2312_ann:                                                    \
-           set = GB2312_set;                                                 \
-           break;                                                            \
-         case GB12345_ann:                                                   \
-           set = GB12345_set;                                                \
-           break;                                                            \
-         case CNS11643_1_ann:                                                \
-           set = CNS11643_1_set;                                             \
-           break;                                                            \
-         default:                                                            \
-           assert ((ann & SO_ann) == ISO_IR_165_ann);                        \
-           set = ISO_IR_165_set;                                             \
-           break;                                                            \
+           if (! ignore_errors_p ())                                         \
+             {                                                               \
+               result = __GCONV_ILLEGAL_INPUT;                               \
+               break;                                                        \
+             }                                                               \
+           ++inptr;                                                          \
+           ++*irreversible;                                                  \
          }                                                                   \
        continue;                                                             \
       }                                                                              \
index ad63f717373dd4c7c2995c0aa5239d95427c9776..b6004e573a5f980c002c14f770e6c9756aeb0450 100644 (file)
@@ -40,7 +40,8 @@ int count_double;
 int count_float;
 int count_ldouble;
 
-#define NCALLS 115
+#define NCALLS     115
+#define NCALLS_INT 4
 
 int
 main (void)
@@ -59,13 +60,13 @@ main (void)
       puts ("long double function called for double test");
       result = 1;
     }
-  if (count_double < NCALLS)
+  if (count_double < NCALLS + NCALLS_INT)
     {
       printf ("double functions not called often enough (%d)\n",
              count_double);
       result = 1;
     }
-  else if (count_double > NCALLS)
+  else if (count_double > NCALLS + NCALLS_INT)
     {
       printf ("double functions called too often (%d)\n",
              count_double);
@@ -131,6 +132,7 @@ main (void)
 
 #define F(name) name
 #define TYPE double
+#define TEST_INT 1
 #define x dx
 #define count count_double
 #include "test-tgmath.c"
@@ -217,6 +219,13 @@ F(compile_test) (void)
   b = fmax (fmax (a, x), fmax (c, b));
   a = fmin (fmin (x, a), fmin (c, b));
   b = fma (sin (a), sin (x), sin (c));
+
+#ifdef TEST_INT
+  a = atan2 (i, b);
+  b = remquo (i, a, &i);
+  c = fma (i, b, i);
+  a = pow (i, c);
+#endif
 }
 #undef x
 
@@ -663,4 +672,5 @@ TYPE
 #undef F
 #undef TYPE
 #undef count
+#undef TEST_INT
 #endif
index 0c02aaa6e79a812491ccc940ee0d8518fb8e2a05..1c085654c3ed87225351f8797aef0adc69c6d407 100644 (file)
@@ -93,8 +93,8 @@
                         __tgmres = __tgml(Fct) (Val1, Val2);                 \
                       else if (sizeof (Val1) == sizeof (double)              \
                                || sizeof (Val2) == sizeof (double)           \
-                               || __builtin_classify_type ((Val1)            \
-                                                           + (Val2)) != 8)   \
+                               || __builtin_classify_type (Val1) != 8        \
+                               || __builtin_classify_type (Val2) != 8)       \
                         __tgmres = Fct (Val1, Val2);                         \
                       else                                                   \
                         __tgmres = Fct##f (Val1, Val2);                      \
                         __tgmres = __tgml(Fct) (Val1, Val2, Val3);           \
                       else if (sizeof (Val1) == sizeof (double)              \
                                || sizeof (Val2) == sizeof (double)           \
-                               || __builtin_classify_type ((Val1)            \
-                                                           + (Val2)) != 8)   \
+                               || __builtin_classify_type (Val1) != 8        \
+                               || __builtin_classify_type (Val2) != 8)       \
                         __tgmres = Fct (Val1, Val2, Val3);                   \
                       else                                                   \
                         __tgmres = Fct##f (Val1, Val2, Val3);                \
                       else if (sizeof (Val1) == sizeof (double)              \
                                || sizeof (Val2) == sizeof (double)           \
                                || sizeof (Val3) == sizeof (double)           \
-                               || __builtin_classify_type ((Val1) + (Val2)   \
-                                                           + (Val3)) != 8)   \
+                               || __builtin_classify_type (Val1) != 8        \
+                               || __builtin_classify_type (Val2) != 8        \
+                               || __builtin_classify_type (Val3) != 8)       \
                         __tgmres = Fct (Val1, Val2, Val3);                   \
                       else                                                   \
                         __tgmres = Fct##f (Val1, Val2, Val3);                \
                         }                                                    \
                       else if (sizeof (__real__ (Val1)) == sizeof (double)   \
                                || sizeof (__real__ (Val2)) == sizeof(double) \
-                               || __builtin_classify_type (__real__ (Val1)   \
-                                                           + __real__ (Val2))\
-                                  != 8)                                      \
+                               || (__builtin_classify_type (__real__ (Val1)) \
+                                   != 8)                                     \
+                               || (__builtin_classify_type (__real__ (Val2)) \
+                                   != 8))                                    \
                         {                                                    \
                           if (sizeof (__real__ (Val1)) == sizeof (Val1)      \
                               && sizeof (__real__ (Val2)) == sizeof (Val2))  \