diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-06-01 16:35:01 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-06-01 16:35:01 +0000 |
commit | 402ba8662b12bb8d9715c0a08a34f39a40472b08 (patch) | |
tree | 025683978bbcbc05c466d6f225a46ab0f8cd980d /gcc/attribs.c | |
parent | b559b9e2e4ee465f2bdf3487f1c85ff46aaefd67 (diff) | |
download | ppe42-gcc-402ba8662b12bb8d9715c0a08a34f39a40472b08.tar.gz ppe42-gcc-402ba8662b12bb8d9715c0a08a34f39a40472b08.zip |
./:
* attribs.c (register_attribute): Use CONST_CAST.
* collect2.c (main): Use CONST_CAST2.
(scan_prog_file): Likewise.
* gcc.c (process_command, main): Likewise.
* toplev.c (toplev_main): Likewise.
* c-typeck.c (handle_warn_cast_qual): New static function,
partially broken out of build_c_cast.
(build_c_cast): Call handle_warn_cast_qual.
* doc/invoke.texi (Warning Options): Document new effect of
-Wcast-qual.
./java:
* jcf-io.c (find_class): Use CONST_CAST.
./testsuite:
* gcc.dg/cast-qual-3.c: New testcase.
* g++.dg/warn/Wcast-qual2.C: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@148053 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/attribs.c')
-rw-r--r-- | gcc/attribs.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/attribs.c b/gcc/attribs.c index 5b18aa35751..5ae462e7287 100644 --- a/gcc/attribs.c +++ b/gcc/attribs.c @@ -1,6 +1,6 @@ /* Functions dealing with attribute handling, used by most front ends. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, - 2002, 2003, 2004, 2005, 2007, 2008 Free Software Foundation, Inc. + 2002, 2003, 2004, 2005, 2007, 2008, 2009 Free Software Foundation, Inc. This file is part of GCC. @@ -195,15 +195,15 @@ void register_attribute (const struct attribute_spec *attr) { struct substring str; - const void **slot; + void **slot; str.str = attr->name; str.length = strlen (str.str); - slot = (const void **)htab_find_slot_with_hash (attribute_hash, &str, - substring_hash (str.str, str.length), - INSERT); + slot = htab_find_slot_with_hash (attribute_hash, &str, + substring_hash (str.str, str.length), + INSERT); gcc_assert (!*slot); - *slot = attr; + *slot = (void *) CONST_CAST (struct attribute_spec *, attr); } /* Return the spec for the attribute named NAME. */ |