+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.
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. */
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));
+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.
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;
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 };
make_temp_file (suffix)
const char *suffix;
{
- char *base = 0;
+ const char *base = 0;
char *temp_filename;
int base_len, suffix_len;
int fd;
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=
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.
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
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
static status_t
demangle_char (dm, c)
demangling_t dm;
- char c;
+ int c;
{
static char *error_message = NULL;
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);
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)
{
/* 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
#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. */
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)
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)
{