Commit 572e5ae3 by Kaveh R. Ghazi Committed by Kaveh Ghazi

optabs.c (libfunc_decl_hash, [...]): Fix -Wcast-qual warnings.

	* optabs.c (libfunc_decl_hash, libfunc_decl_eq): Fix -Wcast-qual
	warnings.

	* Makefile.in (CXX_COMPAT_WARN, cxx_compat_warn): Delete.
	(bitmap.o-warn, dominance.o-warn): New.
	* configure.ac (cxx_compat_warn): Delete.
	(loose_warn): Add -Wcast-qual and -Wc++-compat.
	* system.h: Remove #pragma diagnostic for -Wcast-qual and
	-Wc++-compat.
	* configure: Regenerate.
	
cp:
	* Make-lang.in (cp-warn): Delete $(CXX_COMPAT_WARN).

java:
	* Make-lang.in (java/jcf-io.o-warn): New.

From-SVN: r137246
parent 4dc6c528
2008-06-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2008-06-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Makefile.in (CXX_COMPAT_WARN, cxx_compat_warn): Delete.
(bitmap.o-warn, dominance.o-warn): New.
* configure.ac (cxx_compat_warn): Delete.
(loose_warn): Add -Wcast-qual and -Wc++-compat.
* system.h: Remove #pragma diagnostic for -Wcast-qual and
-Wc++-compat.
* configure: Regenerate.
* optabs.c (libfunc_decl_hash, libfunc_decl_eq): Fix -Wcast-qual
warnings.
2008-06-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* alloc-pool.c (create_alloc_pool): Fix -Wc++-compat warnings. * alloc-pool.c (create_alloc_pool): Fix -Wc++-compat warnings.
* df-scan.c (df_notes_rescan): Likewise. * df-scan.c (df_notes_rescan): Likewise.
* ggc-page.c (set_page_table_entry): Likewise. * ggc-page.c (set_page_table_entry): Likewise.
......
...@@ -160,10 +160,8 @@ coverageexts = .{gcda,gcno} ...@@ -160,10 +160,8 @@ coverageexts = .{gcda,gcno}
# STRICT_WARN are the additional warning flags to # STRICT_WARN are the additional warning flags to
# apply to the back end and the C front end, which may be compiled # apply to the back end and the C front end, which may be compiled
# with other compilers. # with other compilers.
# CXX_COMPAT_WARN are C++ source compatibility warnings.
LOOSE_WARN = @loose_warn@ LOOSE_WARN = @loose_warn@
STRICT_WARN = @strict_warn@ STRICT_WARN = @strict_warn@
CXX_COMPAT_WARN = @cxx_compat_warn@
# This is set by --enable-checking. The idea is to catch forgotten # This is set by --enable-checking. The idea is to catch forgotten
# "extern" tags in header files. # "extern" tags in header files.
...@@ -189,6 +187,10 @@ build/gengtype-lex.o-warn = -Wno-error ...@@ -189,6 +187,10 @@ build/gengtype-lex.o-warn = -Wno-error
SYSCALLS.c.X-warn = -Wno-strict-prototypes -Wno-error SYSCALLS.c.X-warn = -Wno-strict-prototypes -Wno-error
# dfp.c contains alias violations # dfp.c contains alias violations
dfp.o-warn = -Wno-error dfp.o-warn = -Wno-error
# bitmap.c contains -Wc++compat warnings.
bitmap.o-warn = -Wno-error
# dominance.c contains a -Wc++compat warning.
dominance.o-warn = -Wno-error
# All warnings have to be shut off in stage1 if the compiler used then # All warnings have to be shut off in stage1 if the compiler used then
# isn't gcc; configure determines that. WARN_CFLAGS will be either # isn't gcc; configure determines that. WARN_CFLAGS will be either
......
...@@ -323,8 +323,7 @@ AC_CHECK_TYPES([__int64], [AC_CHECK_SIZEOF(__int64)]) ...@@ -323,8 +323,7 @@ AC_CHECK_TYPES([__int64], [AC_CHECK_SIZEOF(__int64)])
# So, we only use -pedantic if we can disable those warnings. # So, we only use -pedantic if we can disable those warnings.
ACX_PROG_CC_WARNING_OPTS([-W -Wall -Wwrite-strings -Wstrict-prototypes \ ACX_PROG_CC_WARNING_OPTS([-W -Wall -Wwrite-strings -Wstrict-prototypes \
-Wmissing-prototypes], [loose_warn]) -Wmissing-prototypes -Wcast-qual -Wc++-compat], [loose_warn])
ACX_PROG_CC_WARNING_OPTS([-Wc++-compat], [cxx_compat_warn])
ACX_PROG_CC_WARNING_OPTS([-Wold-style-definition \ ACX_PROG_CC_WARNING_OPTS([-Wold-style-definition \
-Wmissing-format-attribute], [strict_warn]) -Wmissing-format-attribute], [strict_warn])
ACX_PROG_CC_WARNING_ALMOST_PEDANTIC([-Wno-long-long -Wno-variadic-macros \ ACX_PROG_CC_WARNING_ALMOST_PEDANTIC([-Wno-long-long -Wno-variadic-macros \
......
2008-06-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Make-lang.in (cp-warn): Delete $(CXX_COMPAT_WARN).
2008-06-28 Jakub Jelinek <jakub@redhat.com> 2008-06-28 Jakub Jelinek <jakub@redhat.com>
PR c++/36364 PR c++/36364
......
...@@ -89,7 +89,7 @@ CXX_OBJS = cp/cp-lang.o stub-objc.o $(CXX_AND_OBJCXX_OBJS) ...@@ -89,7 +89,7 @@ CXX_OBJS = cp/cp-lang.o stub-objc.o $(CXX_AND_OBJCXX_OBJS)
c++_OBJS = $(CXX_OBJS) dummy-checksum.o cc1plus-checksum.o cp/g++spec.o c++_OBJS = $(CXX_OBJS) dummy-checksum.o cc1plus-checksum.o cp/g++spec.o
# Use strict warnings for this front end. # Use strict warnings for this front end.
cp-warn = $(STRICT_WARN) $(CXX_COMPAT_WARN) cp-warn = $(STRICT_WARN)
cc1plus-dummy$(exeext): $(CXX_OBJS) dummy-checksum.o $(BACKEND) $(LIBDEPS) cc1plus-dummy$(exeext): $(CXX_OBJS) dummy-checksum.o $(BACKEND) $(LIBDEPS)
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \ $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
......
2008-06-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Make-lang.in (java/jcf-io.o-warn): New.
2008-06-24 Tom Tromey <tromey@redhat.com> 2008-06-24 Tom Tromey <tromey@redhat.com>
* jcf-path.c (jcf_path_init): Don't name variable 'try'. * jcf-path.c (jcf_path_init): Don't name variable 'try'.
......
...@@ -101,6 +101,9 @@ jvspec.o-warn = -Wno-error ...@@ -101,6 +101,9 @@ jvspec.o-warn = -Wno-error
# Bison-1.75 output often yields (harmless) -Wtraditional warnings # Bison-1.75 output often yields (harmless) -Wtraditional warnings
java/parse.o-warn = -Wno-error java/parse.o-warn = -Wno-error
# java/jcf-io.c contains a -Wc++compat warning.
java/jcf-io.o-warn = -Wno-error
jc1$(exeext): $(JAVA_OBJS) $(BACKEND) $(LIBDEPS) attribs.o jc1$(exeext): $(JAVA_OBJS) $(BACKEND) $(LIBDEPS) attribs.o
rm -f $@ rm -f $@
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \ $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
......
...@@ -5992,13 +5992,13 @@ static GTY ((param_is (union tree_node))) htab_t libfunc_decls; ...@@ -5992,13 +5992,13 @@ static GTY ((param_is (union tree_node))) htab_t libfunc_decls;
static hashval_t static hashval_t
libfunc_decl_hash (const void *entry) libfunc_decl_hash (const void *entry)
{ {
return htab_hash_string (IDENTIFIER_POINTER (DECL_NAME ((tree) entry))); return htab_hash_string (IDENTIFIER_POINTER (DECL_NAME ((const_tree) entry)));
} }
static int static int
libfunc_decl_eq (const void *entry1, const void *entry2) libfunc_decl_eq (const void *entry1, const void *entry2)
{ {
return DECL_NAME ((tree) entry1) == (tree) entry2; return DECL_NAME ((const_tree) entry1) == (const_tree) entry2;
} }
rtx rtx
......
...@@ -797,11 +797,9 @@ extern void fancy_abort (const char *, int, const char *) ATTRIBUTE_NORETURN; ...@@ -797,11 +797,9 @@ extern void fancy_abort (const char *, int, const char *) ATTRIBUTE_NORETURN;
#define CONST_CAST_RTX(X) CONST_CAST(struct rtx_def *, (X)) #define CONST_CAST_RTX(X) CONST_CAST(struct rtx_def *, (X))
#define CONST_CAST_BB(X) CONST_CAST(struct basic_block_def *, (X)) #define CONST_CAST_BB(X) CONST_CAST(struct basic_block_def *, (X))
/* Activate -Wcast-qual and -Wc++-compat as warnings (not errors via /* Activate certain diagnostics as warnings (not errors via the
the -Werror flag). */ -Werror flag). */
#if GCC_VERSION >= 4003 #if GCC_VERSION >= 4003
#pragma GCC diagnostic warning "-Wcast-qual"
#pragma GCC diagnostic warning "-Wc++-compat"
/* If asserts are disabled, activate -Wuninitialized as a warning (not /* If asserts are disabled, activate -Wuninitialized as a warning (not
an error/-Werror). */ an error/-Werror). */
#ifndef ENABLE_ASSERT_CHECKING #ifndef ENABLE_ASSERT_CHECKING
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment