This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch installed for last ISO C func def warning in objc-act.c
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 1 Aug 2002 11:48:17 -0400 (EDT)
- Subject: Patch installed for last ISO C func def warning in objc-act.c
This patch fixes this warning:
> objc/objc-act.c:6708: warning: traditional C rejects ISO C style function definitions
This was the last ISO C function definition I get on my platforms.
(You might ask why -Wtraditional is used in the objc dir, so did I.
But after spending a bunch of time working out the twisty Makefile
hacks I gave up and traditionalized it. The entire rest of the
objc-act.c uses K&R style so we're not losing anything.)
Anyway, bootstrapped on solaris2.7 and installed as obvious.
2002-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* objc/objc-act.c (encode_complete_bitfield): Add prototype and
avoid ISO C style function definition.
diff -rup orig/egcc-CVS20020730/gcc/objc/objc-act.c egcc-CVS20020730/gcc/objc/objc-act.c
--- orig/egcc-CVS20020730/gcc/objc/objc-act.c 2002-07-29 19:30:14.000000000 -0400
+++ egcc-CVS20020730/gcc/objc/objc-act.c 2002-07-31 14:28:45.845534369 -0400
@@ -292,6 +292,7 @@ static void generate_classref_translatio
static void handle_class_ref PARAMS ((tree));
static void generate_struct_by_value_array PARAMS ((void))
ATTRIBUTE_NORETURN;
+static void encode_complete_bitfield PARAMS ((int, tree, int));
/*** Private Interface (data) ***/
@@ -6704,7 +6705,10 @@ encode_type (type, curtype, format)
}
static void
-encode_complete_bitfield (int position, tree type, int size)
+encode_complete_bitfield (position, type, size)
+ int position;
+ tree type;
+ int size;
{
enum tree_code code = TREE_CODE (type);
char buffer[40];