Today's K&R problem ... cpphash.c uses `signed'
Kaveh R. Ghazi
ghazi@caip.rutgers.edu
Thu Jul 13 13:14:00 GMT 2000
> From: Zack Weinberg <zack@wolery.cumb.org>
> >
> > PS: another approach would be to simply take the signed keyword out if
> > its not necessary to ensure the `paramc' member is in fact signed.
>
> Yes, you should just remove the keyword. Plain short is always
> signed. The 'signed' keyword was invented by C89 as a kluge around
> the indeterminate signedness of plain char, and that's the only thing
> it's necessary for.
> zw
Done.
Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/egcs/gcc/ChangeLog,v
retrieving revision 1.7105
diff -u -p -r1.7105 ChangeLog
--- ChangeLog 2000/07/13 19:09:21 1.7105
+++ ChangeLog 2000/07/13 20:07:25
@@ -1,5 +1,7 @@
2000-07-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+ * cpphash.c (macro_info): Don't use the `signed' keyword.
+
* system.h (alloca): Prototype if __GNUC__ && __SIZE_TYPE__.
2000-07-13 Jakub Jelinek <jakub@redhat.com>
Index: cpphash.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cpphash.c,v
retrieving revision 1.101
diff -u -p -r1.101 cpphash.c
--- cpphash.c 2000/07/13 02:32:41 1.101
+++ cpphash.c 2000/07/13 20:07:29
@@ -45,7 +45,7 @@ struct hashdummy
struct macro_info
{
unsigned int paramlen;
- signed short paramc;
+ short paramc;
unsigned char flags;
};
More information about the Gcc-patches
mailing list