This part has been run through testing. I need approval for cp/cxx-pretty-print.c tho....
2011-06-07 Bruce Korb <bk...@gnu.org>
* gcc/cp/cxx-pretty-print.c (pp_cxx_decl_specifier_seq): Do not set case label inside an "else" clause. * fixincludes/fixlib.h (tCC): remove these #defines * fixincludes/fixincl.c (machine_matches): pointers are const (start_fixer): clean up tCC and code * fixincludes/genfixes (Ver): latest autogen does not print "Ver." as the lead in to the version number, except for the --help option. This is consistent with earlier behavior. Index: gcc/cp/cxx-pretty-print.c =================================================================== --- gcc/cp/cxx-pretty-print.c (revision 174722) +++ gcc/cp/cxx-pretty-print.c (working copy) @@ -1199,13 +1199,22 @@ case FUNCTION_DECL: /* Constructors don't have return types. And conversion functions - do not have a type-specifier in their return types. */ + do not have a type-specifier in their return types. */ + if (DECL_CONSTRUCTOR_P (t) || DECL_CONV_FN_P (t)) - pp_cxx_function_specifier (pp, t); - else if (DECL_NONSTATIC_MEMBER_FUNCTION_P (t)) - pp_cxx_decl_specifier_seq (pp, TREE_TYPE (TREE_TYPE (t))); - else - default: + { + pp_cxx_function_specifier (pp, t); + break; + } + + if (DECL_NONSTATIC_MEMBER_FUNCTION_P (t)) + { + pp_cxx_decl_specifier_seq (pp, TREE_TYPE (TREE_TYPE (t))); + break; + } + /* FALLTHROUGH */ + + default: pp_c_declaration_specifiers (pp_c_base (pp), t); break; } Index: fixincludes/fixincl.x =================================================================== --- fixincludes/fixincl.x (revision 174678) +++ fixincludes/fixincl.x (working copy) <<GENERATED>> Index: fixincludes/fixlib.h =================================================================== --- fixincludes/fixlib.h (revision 174722) +++ fixincludes/fixlib.h (working copy) @@ -76,8 +76,8 @@ # define STATIC #endif -#define tSCC static const char -#define tCC const char +#define tSCC static char const +#define tCC char const #define tSC static char /* If this particular system's header files define the macro `MAXPATHLEN', @@ -192,14 +192,15 @@ typedef struct fix_desc tFixDesc; struct fix_desc { - tCC* fix_name; /* Name of the fix */ - tCC* file_list; /* List of files it applies to */ - tCC** papz_machs; /* List of machine/os-es it applies to */ - int test_ct; - int fd_flags; - tTestDesc* p_test_desc; - tCC** patch_args; - long unused; + char const * fix_name; /* Name of the fix */ + char const * file_list; /* List of files it applies to */ + char const * const * + papz_machs; /* List of machine/os-es it applies to */ + int const test_ct; + int fd_flags; + tTestDesc * p_test_desc; + char const ** patch_args; + long unused; }; typedef struct { Index: fixincludes/genfixes =================================================================== --- fixincludes/genfixes (revision 174722) +++ fixincludes/genfixes (working copy) @@ -62,7 +62,7 @@ AG="autogen $AG" set -e -if [ -z "`${AG} -v | fgrep 'Ver. 5.'`" ] +if [ -z "`${AG} -? | fgrep 'Ver. 5.'`" ] then echo "AutoGen appears to be out of date or not correctly installed." echo "Please download and install:" Index: fixincludes/fixincl.c =================================================================== --- fixincludes/fixincl.c (revision 174722) +++ fixincludes/fixincl.c (working copy) @@ -361,7 +361,7 @@ static int machine_matches( tFixDesc* p_fixd ) { - char const ** papz_machs = p_fixd->papz_machs; + char const * const * papz_machs = p_fixd->papz_machs; int have_match = BOOL_FALSE; for (;;) @@ -393,7 +393,7 @@ void run_compiles (void) { - tFixDesc *p_fixd = fixDescList; + tFixDesc const * p_fixd = fixDescList; int fix_ct = FIX_COUNT; regex_t *p_re = XCNEWVEC (regex_t, REGEX_COUNT); @@ -950,20 +950,15 @@ static int start_fixer (int read_fd, tFixDesc* p_fixd, char* pz_fix_file) { - tCC* pz_cmd_save; - char* pz_cmd; + char const * pz_cmd_save = NULL; + char * pz_cmd = NULL; if ((p_fixd->fd_flags & FD_SUBROUTINE) != 0) return internal_fix (read_fd, p_fixd); - if ((p_fixd->fd_flags & FD_SHELL_SCRIPT) == 0) + if ((p_fixd->fd_flags & FD_SHELL_SCRIPT) != 0) { - pz_cmd = NULL; - pz_cmd_save = NULL; - } - else - { - tSCC z_cmd_fmt[] = "file='%s'\n%s"; + static char const z_cmd_fmt[] = "file='%s'\n%s"; pz_cmd = XNEWVEC (char, strlen (p_fixd->patch_args[2]) + sizeof (z_cmd_fmt) + strlen (pz_fix_file)); sprintf (pz_cmd, z_cmd_fmt, pz_fix_file, p_fixd->patch_args[2]); @@ -1226,7 +1221,7 @@ void process (void) { - tFixDesc *p_fixd = fixDescList; + tFixDesc const * p_fixd = fixDescList; int todo_ct = FIX_COUNT; int read_fd = -1; # ifndef SEPARATE_FIX_PROC