diff --git a/lang/gpc/Makefile b/lang/gpc/Makefile index e51bbc8e994..7a633077471 100644 --- a/lang/gpc/Makefile +++ b/lang/gpc/Makefile @@ -3,7 +3,7 @@ NOT_FOR_ARCHS = aarch64 m88k mips64 powerpc64 riscv64 COMMENT = GNU Pascal compiler DISTNAME = gpc-20070904 -REVISION = 19 +REVISION = 20 CATEGORIES = lang HOMEPAGE = https://www.gnu-pascal.de/gpc/h-index.html diff --git a/lang/gpc/patches/patch-gcc_p_typecheck_c b/lang/gpc/patches/patch-gcc_p_typecheck_c new file mode 100644 index 00000000000..c923bb6722c --- /dev/null +++ b/lang/gpc/patches/patch-gcc_p_typecheck_c @@ -0,0 +1,15 @@ +Index: gcc/p/typecheck.c +--- gcc/p/typecheck.c.orig ++++ gcc/p/typecheck.c +@@ -3931,7 +3931,11 @@ really_start_incremental_init (tree type) + constructor_constant = 1; + constructor_simple = 1; + constructor_depth = SPELLING_DEPTH (); ++#ifndef GCC_4_1 + constructor_elements = NULL_TREE; ++#else ++ constructor_elements = NULL; ++#endif + constructor_pending_elts = NULL_TREE; + constructor_type = type; + diff --git a/lang/gpc/patches/patch-libcpp_directives_c b/lang/gpc/patches/patch-libcpp_directives_c new file mode 100644 index 00000000000..4f152b83334 --- /dev/null +++ b/lang/gpc/patches/patch-libcpp_directives_c @@ -0,0 +1,51 @@ +cpp-id-data.h (UC): Was U, conflicts with U... +https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=b6baa67d7947f + +Index: libcpp/directives.c +--- libcpp/directives.c.orig ++++ libcpp/directives.c +@@ -187,7 +187,7 @@ DIRECTIVE_TABLE + did use this notation in its preprocessed output. */ + static const directive linemarker_dir = + { +- do_linemarker, U"#", 1, KANDR, IN_I ++ do_linemarker, UC"#", 1, KANDR, IN_I + }; + + #define SEEN_EOL() (pfile->cur_token[-1].type == CPP_EOF) +@@ -681,7 +681,7 @@ parse_include (cpp_reader *pfile, int *pangle_brackets + const unsigned char *dir; + + if (pfile->directive == &dtable[T_PRAGMA]) +- dir = U"pragma dependency"; ++ dir = UC"pragma dependency"; + else + dir = pfile->directive->name; + cpp_error (pfile, CPP_DL_ERROR, "#%s expects \"FILENAME\" or ", +@@ -1060,7 +1060,7 @@ register_pragma_1 (cpp_reader *pfile, const char *spac + + if (space) + { +- node = cpp_lookup (pfile, U space, strlen (space)); ++ node = cpp_lookup (pfile, UC space, strlen (space)); + entry = lookup_pragma_entry (*chain, node); + if (!entry) + { +@@ -1089,7 +1089,7 @@ register_pragma_1 (cpp_reader *pfile, const char *spac + } + + /* Check for duplicates. */ +- node = cpp_lookup (pfile, U name, strlen (name)); ++ node = cpp_lookup (pfile, UC name, strlen (name)); + entry = lookup_pragma_entry (*chain, node); + if (entry == NULL) + { +@@ -1237,7 +1237,7 @@ restore_registered_pragmas (cpp_reader *pfile, struct + { + if (pe->is_nspace) + sd = restore_registered_pragmas (pfile, pe->u.space, sd); +- pe->pragma = cpp_lookup (pfile, U *sd, strlen (*sd)); ++ pe->pragma = cpp_lookup (pfile, UC *sd, strlen (*sd)); + free (*sd); + sd++; + } diff --git a/lang/gpc/patches/patch-libcpp_include_cpp-id-data_h b/lang/gpc/patches/patch-libcpp_include_cpp-id-data_h new file mode 100644 index 00000000000..5ee92ac1c46 --- /dev/null +++ b/lang/gpc/patches/patch-libcpp_include_cpp-id-data_h @@ -0,0 +1,15 @@ +cpp-id-data.h (UC): Was U, conflicts with U... +https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=b6baa67d7947f + +Index: libcpp/include/cpp-id-data.h +--- libcpp/include/cpp-id-data.h.orig ++++ libcpp/include/cpp-id-data.h +@@ -22,7 +22,7 @@ Foundation, 51 Franklin Street, Fifth Floor, Boston, M + typedef unsigned char uchar; + #endif + +-#define U (const unsigned char *) /* Intended use: U"string" */ ++#define UC (const unsigned char *) /* Intended use: UC"string" */ + + /* Chained list of answers to an assertion. */ + struct answer GTY(()) diff --git a/lang/gpc/patches/patch-libcpp_lex_c b/lang/gpc/patches/patch-libcpp_lex_c new file mode 100644 index 00000000000..4e69b5019bd --- /dev/null +++ b/lang/gpc/patches/patch-libcpp_lex_c @@ -0,0 +1,20 @@ +cpp-id-data.h (UC): Was U, conflicts with U... +https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=b6baa67d7947f + +Index: libcpp/lex.c +--- libcpp/lex.c.orig ++++ libcpp/lex.c +@@ -39,10 +39,10 @@ struct token_spelling + }; + + static const unsigned char *const digraph_spellings[] = +-{ U"%:", U"%:%:", U"<:", U":>", U"<%", U"%>" }; ++{ UC"%:", UC"%:%:", UC"<:", UC":>", UC"<%", UC"%>" }; + +-#define OP(e, s) { SPELL_OPERATOR, U s }, +-#define TK(e, s) { SPELL_ ## s, U #e }, ++#define OP(e, s) { SPELL_OPERATOR, UC s }, ++#define TK(e, s) { SPELL_ ## s, UC #e }, + static const struct token_spelling token_spellings[N_TTYPES] = { TTYPE_TABLE }; + #undef OP + #undef TK diff --git a/lang/gpc/patches/patch-libcpp_macro_c b/lang/gpc/patches/patch-libcpp_macro_c new file mode 100644 index 00000000000..d2cc1e35342 --- /dev/null +++ b/lang/gpc/patches/patch-libcpp_macro_c @@ -0,0 +1,26 @@ +cpp-id-data.h (UC): Was U, conflicts with U... +https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=b6baa67d7947f + +Index: libcpp/macro.c +--- libcpp/macro.c.orig ++++ libcpp/macro.c +@@ -154,7 +154,7 @@ _cpp_builtin_macro_text (cpp_reader *pfile, cpp_hashno + { + cpp_errno (pfile, CPP_DL_WARNING, + "could not determine file timestamp"); +- pbuffer->timestamp = U"\"??? ??? ?? ??:??:?? ????\""; ++ pbuffer->timestamp = UC"\"??? ??? ?? ??:??:?? ????\""; + } + } + } +@@ -252,8 +252,8 @@ _cpp_builtin_macro_text (cpp_reader *pfile, cpp_hashno + cpp_errno (pfile, CPP_DL_WARNING, + "could not determine date and time"); + +- pfile->date = U"\"??? ?? ????\""; +- pfile->time = U"\"??:??:??\""; ++ pfile->date = UC"\"??? ?? ????\""; ++ pfile->time = UC"\"??:??:??\""; + } + } +