diff --git a/gcc/f/ChangeLog b/gcc/f/ChangeLog index 19b71219f80..291745c801e 100644 --- a/gcc/f/ChangeLog +++ b/gcc/f/ChangeLog @@ -1,3 +1,16 @@ +Wed Apr 7 09:47:09 1999 Kaveh R. Ghazi + + * ansify.c (die): Specify void argument. + + * intdoc.c (family_name, dumpgen, dumpspec, dumpimp, + argument_info_ptr, argument_info_string, argument_name_ptr, + argument_name_string, elaborate_if_complex, + elaborate_if_maybe_complex, elaborate_if_real, print_type_string): + Const-ify a char*. + (main): Mark parameter `argv' with ATTRIBUTE_UNUSED. + (_ffeintrin_name_, _ffeintrin_gen_, _ffeintrin_spec_, + _ffeintrin_imp_, cc_pair, descriptions, summaries): Const-ify a char*. + Mon Apr 5 11:57:54 1999 Donn Terry (donn@interix.com) * Make-lang.in (HOST_CFLAGS): compute dynamically. diff --git a/gcc/f/ansify.c b/gcc/f/ansify.c index 15b05e8fd90..6c6d01f911f 100644 --- a/gcc/f/ansify.c +++ b/gcc/f/ansify.c @@ -51,7 +51,7 @@ typedef enum while(0) static void -die () +die (void) { exit (1); } diff --git a/gcc/f/intdoc.c b/gcc/f/intdoc.c index 917fc2ea808..7e0a630489f 100644 --- a/gcc/f/intdoc.c +++ b/gcc/f/intdoc.c @@ -46,30 +46,30 @@ typedef enum #define FFEINTRIN_DOC 1 #include "intrin.h" -char *family_name (ffeintrinFamily family); +const char *family_name (ffeintrinFamily family); static void dumpif (ffeintrinFamily fam); static void dumpendif (void); static void dumpclearif (void); static void dumpem (void); -static void dumpgen (int menu, char *name, char *name_uc, +static void dumpgen (int menu, const char *name, const char *name_uc, ffeintrinGen gen); -static void dumpspec (int menu, char *name, char *name_uc, +static void dumpspec (int menu, const char *name, const char *name_uc, ffeintrinSpec spec); -static void dumpimp (int menu, char *name, char *name_uc, size_t genno, ffeintrinFamily family, +static void dumpimp (int menu, const char *name, const char *name_uc, size_t genno, ffeintrinFamily family, ffeintrinImp imp, ffeintrinSpec spec); -static char *argument_info_ptr (ffeintrinImp imp, int argno); -static char *argument_info_string (ffeintrinImp imp, int argno); -static char *argument_name_ptr (ffeintrinImp imp, int argno); -static char *argument_name_string (ffeintrinImp imp, int argno); +static const char *argument_info_ptr (ffeintrinImp imp, int argno); +static const char *argument_info_string (ffeintrinImp imp, int argno); +static const char *argument_name_ptr (ffeintrinImp imp, int argno); +static const char *argument_name_string (ffeintrinImp imp, int argno); #if 0 -static char *elaborate_if_complex (ffeintrinImp imp, int argno); -static char *elaborate_if_maybe_complex (ffeintrinImp imp, int argno); -static char *elaborate_if_real (ffeintrinImp imp, int argno); +static const char *elaborate_if_complex (ffeintrinImp imp, int argno); +static const char *elaborate_if_maybe_complex (ffeintrinImp imp, int argno); +static const char *elaborate_if_real (ffeintrinImp imp, int argno); #endif -static void print_type_string (char *c); +static void print_type_string (const char *c); int -main (int argc, char **argv) +main (int argc, char **argv ATTRIBUTE_UNUSED) { if (argc != 1) { @@ -86,22 +86,22 @@ Usage: intdoc > intdoc.texi\n\ struct _ffeintrin_name_ { - char *name_uc; - char *name_lc; - char *name_ic; + const char *name_uc; + const char *name_lc; + const char *name_ic; ffeintrinGen generic; ffeintrinSpec specific; }; struct _ffeintrin_gen_ { - char *name; /* Name as seen in program. */ + const char *name; /* Name as seen in program. */ ffeintrinSpec specs[2]; }; struct _ffeintrin_spec_ { - char *name; /* Uppercase name as seen in source code, + const char *name; /* Uppercase name as seen in source code, lowercase if no source name, "none" if no name at all (NONE case). */ bool is_actualarg; /* Ok to pass as actual arg if -pedantic. */ @@ -111,11 +111,11 @@ struct _ffeintrin_spec_ struct _ffeintrin_imp_ { - char *name; /* Name of implementation. */ + const char *name; /* Name of implementation. */ #if 0 /* FFECOM_targetCURRENT == FFECOM_targetGCC */ ffecomGfrt gfrt; /* gfrt index in library. */ #endif /* FFECOM_targetCURRENT == FFECOM_targetGCC */ - char *control; + const char *control; }; static struct _ffeintrin_name_ names[] = { @@ -187,23 +187,23 @@ static struct _ffeintrin_spec_ specs[] = { #undef DEFIMPY }; -struct cc_pair { ffeintrinImp imp; char *text; }; +struct cc_pair { ffeintrinImp imp; const char *text; }; -static char *descriptions[FFEINTRIN_imp] = { 0 }; +static const char *descriptions[FFEINTRIN_imp] = { 0 }; static struct cc_pair cc_descriptions[] = { #define DEFDOC(IMP,SUMMARY,DESCRIPTION) { FFEINTRIN_imp ## IMP, DESCRIPTION }, #include "intdoc.h0" #undef DEFDOC }; -static char *summaries[FFEINTRIN_imp] = { 0 }; +static const char *summaries[FFEINTRIN_imp] = { 0 }; static struct cc_pair cc_summaries[] = { #define DEFDOC(IMP,SUMMARY,DESCRIPTION) { FFEINTRIN_imp ## IMP, SUMMARY }, #include "intdoc.h0" #undef DEFDOC }; -char * +const char * family_name (ffeintrinFamily family) { switch (family) @@ -324,7 +324,7 @@ dumpem () } static void -dumpgen (int menu, char *name, char *name_uc, ffeintrinGen gen) +dumpgen (int menu, const char *name, const char *name_uc, ffeintrinGen gen) { size_t i; int total = 0; @@ -377,7 +377,7 @@ For information on other intrinsics with the same name:\n"); } static void -dumpspec (int menu, char *name, char *name_uc, ffeintrinSpec spec) +dumpspec (int menu, const char *name, const char *name_uc, ffeintrinSpec spec) { dumpif (specs[spec].family); dumpimp (menu, name, name_uc, 0, specs[spec].family, specs[spec].implementation, @@ -386,13 +386,13 @@ dumpspec (int menu, char *name, char *name_uc, ffeintrinSpec spec) } static void -dumpimp (int menu, char *name, char *name_uc, size_t genno, ffeintrinFamily family, ffeintrinImp imp, - ffeintrinSpec spec) +dumpimp (int menu, const char *name, const char *name_uc, size_t genno, + ffeintrinFamily family, ffeintrinImp imp, ffeintrinSpec spec) { - char *c; + const char *c; bool subr; - char *argc; - char *argi; + const char *argc; + const char *argi; int colon; int argno; @@ -410,7 +410,7 @@ dumpimp (int menu, char *name, char *name_uc, size_t genno, ffeintrinFamily fami || (summaries[imp] != NULL)) { int spaces = INDENT_SUMMARY - 14 - strlen (name); - char *c; + const char *c; if (spec != FFEINTRIN_specNONE) spaces -= (3 + strlen (specs[spec].name)); /* See XYZZY1 above */ @@ -520,8 +520,8 @@ external procedure.\n\ if (!subr) { int other_arg; - char *arg_string; - char *arg_info; + const char *arg_string; + const char *arg_info; if ((c[colon + 1] >= '0') && (c[colon + 1] <= '9')) @@ -1030,7 +1030,7 @@ Intrinsic groups: "); if (descriptions[imp] != NULL) { - char *c = descriptions[imp]; + const char *c = descriptions[imp]; printf ("\ @noindent\n\ @@ -1067,10 +1067,10 @@ Description:\n\ } } -static char * +static const char * argument_info_ptr (ffeintrinImp imp, int argno) { - char *c = imps[imp].control; + const char *c = imps[imp].control; static char arginfos[8][32]; static int argx = 0; int i; @@ -1110,20 +1110,20 @@ argument_info_ptr (ffeintrinImp imp, int argno) return c; } -static char * +static const char * argument_info_string (ffeintrinImp imp, int argno) { - char *p; + const char *p; p = argument_info_ptr (imp, argno); assert (p != NULL); return p; } -static char * +static const char * argument_name_ptr (ffeintrinImp imp, int argno) { - char *c = imps[imp].control; + const char *c = imps[imp].control; static char argnames[8][32]; static int argx = 0; int i; @@ -1159,10 +1159,10 @@ argument_name_ptr (ffeintrinImp imp, int argno) return c; } -static char * +static const char * argument_name_string (ffeintrinImp imp, int argno) { - char *p; + const char *p; p = argument_name_ptr (imp, argno); assert (p != NULL); @@ -1170,7 +1170,7 @@ argument_name_string (ffeintrinImp imp, int argno) } static void -print_type_string (char *c) +print_type_string (const char *c) { char basic = c[0]; char kind = c[1];