configure.in (ac_libiberty_warn_cflags): Add -pedantic.
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
This commit is contained in:
parent
7eb23b1f31
commit
69197e7e5e
@ -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.
|
||||
|
@ -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. */
|
||||
|
@ -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));
|
||||
|
@ -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.
|
||||
|
@ -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;
|
||||
|
2
libiberty/configure
vendored
2
libiberty/configure
vendored
@ -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=
|
||||
|
@ -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.
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user