]> gcc.gnu.org Git - gcc.git/commitdiff
configure.in (ac_libiberty_warn_cflags): Add -pedantic.
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Wed, 7 Jun 2000 21:13:14 +0000 (21:13 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Wed, 7 Jun 2000 21:13:14 +0000 (21:13 +0000)
libiberty:
* configure.in (ac_libiberty_warn_cflags): Add -pedantic.

* choose-temp.c (try, choose_temp_base, make_temp_file): Constify.

* cp-demangle.c (demangle_char): Change parameter from char to int.
(demangle_expression, demangle_expr_primary): Remove extra
semi-colon in prototype.

* dyn-string.c (dyn_string_append_char): Change parameter from
char to int.

* memcmp.c (memcmp): Constify.

* mkstemps.c (gcc_uint64_t): Mark GNUC `long long' case with
__extension__.

* partition.c (elem_compare): Prototype.  Don't cast away
const-ness.

* setenv.c (setenv): Use braces to avoid ambiguous `else'.

include:
* demangle.h (demangling_styles): Remove trailing comma in enum.

* dyn-string.h (dyn_string_append_char): Change parameter from
char to int.

From-SVN: r34447

13 files changed:
include/ChangeLog
include/demangle.h
include/dyn-string.h
libiberty/ChangeLog
libiberty/choose-temp.c
libiberty/configure
libiberty/configure.in
libiberty/cp-demangle.c
libiberty/dyn-string.c
libiberty/memcmp.c
libiberty/mkstemps.c
libiberty/partition.c
libiberty/setenv.c

index c74f03e3204084de9b1dc2562cb154c145416925..9e5617dc429debae1252ac3fba360ebb1a7352f5 100644 (file)
@@ -1,3 +1,10 @@
+2000-06-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * demangle.h (demangling_styles): Remove trailing comma in enum.
+
+       * dyn-string.h (dyn_string_append_char): Change parameter from
+       char to int.
+
 2000-06-04  Alex Samuel  <samuel@codesourcery.com>
 
        * dyn-string.h: Move here from gcc/dyn-string.h.  Add new functions.
index 146c895d96bec834cf1d2717d2ab157f743c032c..61dd23071a451e8b27766f3ce5042cb0a3ad5552 100644 (file)
@@ -59,7 +59,7 @@ extern enum demangling_styles
   arm_demangling = DMGL_ARM,
   hp_demangling = DMGL_HP,
   edg_demangling = DMGL_EDG,
-  gnu_new_abi_demangling = DMGL_GNU_NEW_ABI,
+  gnu_new_abi_demangling = DMGL_GNU_NEW_ABI
 } current_demangling_style;
 
 /* Define string names for the various demangling styles. */
index 30c0624baa26aa704de7b3b5a8e8bdab2ef24dd5..3e2213e5bc6fc1e0e5e223f6b2e2cbc33157b373 100644 (file)
@@ -58,7 +58,7 @@ extern dyn_string_t dyn_string_append   PARAMS ((dyn_string_t, dyn_string_t));
 extern dyn_string_t dyn_string_append_cstr   
                                         PARAMS ((dyn_string_t, const char *));
 extern dyn_string_t dyn_string_append_char
-                                        PARAMS ((dyn_string_t, char));
+                                        PARAMS ((dyn_string_t, int));
 extern void dyn_string_substring        PARAMS ((dyn_string_t, 
                                                 dyn_string_t, int, int));
 extern int dyn_string_eq                PARAMS ((dyn_string_t, dyn_string_t));
index 34f2908cba73bdc04ee9ebbe18889cb6c0637504..a9a15f116f320a0e995e1a43d51c84ce8f8b3c7b 100644 (file)
@@ -1,3 +1,26 @@
+2000-06-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * configure.in (ac_libiberty_warn_cflags): Add -pedantic.
+       
+       * choose-temp.c (try, choose_temp_base, make_temp_file): Constify.
+
+       * cp-demangle.c (demangle_char): Change parameter from char to int.
+       (demangle_expression, demangle_expr_primary): Remove extra
+       semi-colon in prototype.
+
+       * dyn-string.c (dyn_string_append_char): Change parameter from
+       char to int.
+
+       * memcmp.c (memcmp): Constify.
+
+       * mkstemps.c (gcc_uint64_t): Mark GNUC `long long' case with
+       __extension__.
+
+       * partition.c (elem_compare): Prototype.  Don't cast away
+       const-ness.
+
+       * setenv.c (setenv): Use braces to avoid ambiguous `else'.
+       
 2000-06-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * Makefile.in (cp-demangle.o): Depend on $(INCDIR)/demangle.h.
index 826d818ed62c3fa455d0a9ba433420f06933cac8..1a475dd6fb93b91cd2cb2d26416a7d779cec13ac 100644 (file)
@@ -79,9 +79,11 @@ extern int mkstemps ();
    If success, DIR is returned.
    Otherwise NULL is returned.  */
 
-static char *
+static const char *try PARAMS ((const char *, const char *));
+
+static const char *
 try (dir, base)
-     char *dir, *base;
+     const char *dir, *base;
 {
   if (base != 0)
     return base;
@@ -102,7 +104,7 @@ try (dir, base)
 char *
 choose_temp_base ()
 {
-  char *base = 0;
+  const char *base = 0;
   char *temp_filename;
   int len;
   static char tmp[] = { DIR_SEPARATOR, 't', 'm', 'p', 0 };
@@ -147,7 +149,7 @@ char *
 make_temp_file (suffix)
      const char *suffix;
 {
-  char *base = 0;
+  const char *base = 0;
   char *temp_filename;
   int base_len, suffix_len;
   int fd;
index 891c656ebc487db4dd548573d7c563292c14d532..ef375bbcccd37e1e8891cc0e703292230ea1850f 100755 (executable)
@@ -845,7 +845,7 @@ echo "$ac_t""$ac_cv_prog_gcc" 1>&6
 
 if test $ac_cv_prog_gcc = yes; then
   GCC=yes
-  ac_libiberty_warn_cflags='-W -Wall -Wtraditional'
+  ac_libiberty_warn_cflags='-W -Wall -Wtraditional -pedantic'
   ac_test_CFLAGS="${CFLAGS+set}"
   ac_save_CFLAGS="$CFLAGS"
   CFLAGS=
index 0814ae3296790182985d96c215840ce59628f99a..6ad054a6448c0aaecf8e3d730ba840e1077ef6c9 100644 (file)
@@ -55,7 +55,7 @@ AC_PROG_CC_GNU
 
 if test $ac_cv_prog_gcc = yes; then
   GCC=yes
-  ac_libiberty_warn_cflags='-W -Wall -Wtraditional'
+  ac_libiberty_warn_cflags='-W -Wall -Wtraditional -pedantic'
 dnl Check whether -g works, even if CFLAGS is set, in case the package
 dnl plays around with CFLAGS (such as to build both debugging and
 dnl normal versions of a library), tasteless as that idea is.
index 502035f4ff24317eb4b7cc60a273e57edd49329a..2feac6c30efed0f45ba450ac44dfe1520e89a14a 100644 (file)
@@ -713,7 +713,7 @@ demangling_delete (dm)
    structure.  */
 
 static status_t demangle_char
-  PARAMS ((demangling_t, char));
+  PARAMS ((demangling_t, int));
 static status_t demangle_mangled_name 
   PARAMS ((demangling_t));
 static status_t demangle_encoding
@@ -765,11 +765,11 @@ static status_t demangle_literal
 static status_t demangle_template_arg
   PARAMS ((demangling_t));
 static status_t demangle_expression
-  PARAMS ((demangling_t));;
+  PARAMS ((demangling_t));
 static status_t demangle_scope_expression
   PARAMS ((demangling_t));
 static status_t demangle_expr_primary
-  PARAMS ((demangling_t));;
+  PARAMS ((demangling_t));
 static status_t demangle_substitution
   PARAMS ((demangling_t, int *, int *));
 static status_t demangle_local_name
@@ -789,7 +789,7 @@ static status_t cp_demangle
 static status_t
 demangle_char (dm, c)
      demangling_t dm;
-     char c;
+     int c;
 {
   static char *error_message = NULL;
 
index f6fad61803155a3c4817691c82489b4eca0482fc..2ae64ebb6c210087f5c0a1b92784e06a57455791 100644 (file)
@@ -275,7 +275,7 @@ dyn_string_append_cstr (ds, s)
 dyn_string_t 
 dyn_string_append_char (ds, c)
      dyn_string_t ds;
-     char c;
+     int c;
 {
   /* Make room for the extra character.  */
   dyn_string_resize (ds, ds->length + 1);
index 127ae0c8019d237429add30809d2a4016855e86d..0fd21cad11edcee49c403dbac179ed7efccd56cf 100644 (file)
@@ -25,8 +25,8 @@ int
 DEFUN(memcmp, (str1, str2, count),
       const PTR str1 AND const PTR str2 AND size_t count)
 {
-  register unsigned char *s1 = (unsigned char*)str1;
-  register unsigned char *s2 = (unsigned char*)str2;
+  register const unsigned char *s1 = (const unsigned char*)str1;
+  register const unsigned char *s2 = (const unsigned char*)str2;
 
   while (count-- > 0)
     {
index 16c16a23263a2b77a0065494f7ea32a0d2c3e0a1..6ef526ece3dbcf30f8617dbd608f9948fd06762e 100644 (file)
@@ -39,7 +39,7 @@
 
 /* We need to provide a type for gcc_uint64_t.  */
 #ifdef __GNUC__
-typedef unsigned long long gcc_uint64_t;
+__extension__ typedef unsigned long long gcc_uint64_t;
 #else
 typedef unsigned long gcc_uint64_t;
 #endif
index 52fb128d7bfe9ea887fd9a91af1eaf7a1b5a48e6..6975af49594042a3bd33cdc03f32595ad97fe8fc 100644 (file)
@@ -34,6 +34,8 @@
 #include "libiberty.h"
 #include "partition.h"
 
+static int elem_compare PARAMS ((const void *, const void *));
+
 /* Creates a partition of NUM_ELEMENTS elements.  Initially each
    element is in a class by itself.  */
 
@@ -128,8 +130,8 @@ elem_compare (elem1, elem2)
      const void *elem1;
      const void *elem2;
 {
-  int e1 = * (int *) elem1;
-  int e2 = * (int *) elem2;
+  int e1 = * (const int *) elem1;
+  int e2 = * (const int *) elem2;
   if (e1 < e2)
     return -1;
   else if (e1 > e2)
index eec13006c22936ed40530b0f90c33cd4c1784b93..a90c83ad78eea7465bd3a4f33e68aee51a0eab68 100644 (file)
@@ -72,11 +72,13 @@ setenv (name, value, replace)
 
   size = 0;
   if (__environ != NULL)
-    for (ep = __environ; *ep != NULL; ++ep)
-      if (!strncmp (*ep, name, namelen) && (*ep)[namelen] == '=')
-       break;
-      else
-       ++size;
+    {
+      for (ep = __environ; *ep != NULL; ++ep)
+       if (!strncmp (*ep, name, namelen) && (*ep)[namelen] == '=')
+         break;
+       else
+         ++size;
+    }
 
   if (__environ == NULL || *ep == NULL)
     {
This page took 0.081786 seconds and 5 git commands to generate.