summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/cc
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1994-11-15 04:52:19 +0000
committerphk <phk@FreeBSD.org>1994-11-15 04:52:19 +0000
commit0a7f3ebca38be02e7bbe69639851fb473fee1878 (patch)
treecf95ec03f06accade4e1638056fb6513bccd761b /gnu/usr.bin/cc
parente6a9926ecfc5c236d9049d3a18c271dac05c8701 (diff)
downloadFreeBSD-src-0a7f3ebca38be02e7bbe69639851fb473fee1878.zip
FreeBSD-src-0a7f3ebca38be02e7bbe69639851fb473fee1878.tar.gz
Integrated GCC-2.6.1 -> GCC-2.6.2 changes.
Notice that the libgcc DOESN'T change number, because there are no changes. Also now the gnu2bmake stuff is synchronized again. I commit this so that others can test too. You might want to postpone any "make worlds" until tomorrow, to avoid any problems I didn't see in the first pass. Thanks to Bruce for rounding up our changes to gcc.
Diffstat (limited to 'gnu/usr.bin/cc')
-rw-r--r--gnu/usr.bin/cc/Makefile2
-rw-r--r--gnu/usr.bin/cc/Makefile.inc6
-rw-r--r--gnu/usr.bin/cc/c++/Makefile2
-rw-r--r--gnu/usr.bin/cc/cc/Makefile10
-rw-r--r--gnu/usr.bin/cc/cc/gcc.c4
-rw-r--r--gnu/usr.bin/cc/cc1/c-decl.c9
-rw-r--r--gnu/usr.bin/cc/cc_int/Makefile4
-rw-r--r--gnu/usr.bin/cc/cc_int/aux-output.c4
-rw-r--r--gnu/usr.bin/cc/cc_int/bc-emit.c2
-rw-r--r--gnu/usr.bin/cc/cc_int/c-common.c43
-rw-r--r--gnu/usr.bin/cc/cc_int/calls.c5
-rw-r--r--gnu/usr.bin/cc/cc_int/combine.c9
-rw-r--r--gnu/usr.bin/cc/cc_int/expmed.c6
-rw-r--r--gnu/usr.bin/cc/cc_int/function.c17
-rw-r--r--gnu/usr.bin/cc/cc_int/real.c8
-rw-r--r--gnu/usr.bin/cc/cc_int/reg-stack.c17
-rw-r--r--gnu/usr.bin/cc/cc_int/reload1.c8
-rw-r--r--gnu/usr.bin/cc/cc_int/version.c2
-rw-r--r--gnu/usr.bin/cc/cccp/Makefile5
-rw-r--r--gnu/usr.bin/cc/cpp/Makefile5
-rw-r--r--gnu/usr.bin/cc/cpp/cccp.c52
-rw-r--r--gnu/usr.bin/cc/include/bc-arity.h42
-rw-r--r--gnu/usr.bin/cc/include/obstack.h7
-rw-r--r--gnu/usr.bin/cc/libgcc/Makefile2
24 files changed, 156 insertions, 115 deletions
diff --git a/gnu/usr.bin/cc/Makefile b/gnu/usr.bin/cc/Makefile
index 344b60c..608c9b1 100644
--- a/gnu/usr.bin/cc/Makefile
+++ b/gnu/usr.bin/cc/Makefile
@@ -1,5 +1,5 @@
#
-# $Id: Makefile,v 1.2 1994/09/18 22:35:35 wollman Exp $
+# $Id$
#
PGMDIR= cc_int cpp cc1 cc cc1plus c++ f77 libgcc
diff --git a/gnu/usr.bin/cc/Makefile.inc b/gnu/usr.bin/cc/Makefile.inc
index caadf00..fb95937 100644
--- a/gnu/usr.bin/cc/Makefile.inc
+++ b/gnu/usr.bin/cc/Makefile.inc
@@ -1,5 +1,5 @@
#
-# $Id: Makefile.inc,v 1.8 1994/11/03 20:37:05 phk Exp $
+# $Id$
#
CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../include
@@ -7,7 +7,7 @@ CFLAGS+= -Dbsd4_4
CFLAGS+= -DGCC_INCLUDE_DIR=\"FOO\"
CFLAGS+= -DTOOL_INCLUDE_DIR=\"FOO\"
CFLAGS+= -DGPLUSPLUS_INCLUDE_DIR=\"FOO\"
-CFLAGS+= -DDEFAULT_TARGET_VERSION=\"2.6.1\"
+CFLAGS+= -DDEFAULT_TARGET_VERSION=\"2.6.2\"
CFLAGS+= -DDEFAULT_TARGET_MACHINE=\"i386--freebsd\"
CFLAGS+= -DMD_EXEC_PREFIX=\"/usr/libexec/\"
CFLAGS+= -DSTANDARD_STARTFILE_PREFIX=\"/usr/lib\"
@@ -22,7 +22,7 @@ LIBDESTDIR= ${.CURDIR}/../cc_int
# XXX LDDESTDIR isn't a directory and there is no standard name for the dir
LDDESTDIR= -L${LIBDESTDIR}
.if defined(SHARED_LIBCC_INT)
-LIBCC_INT= ${LIBDESTDIR}/libcc_int.so.261.0
+LIBCC_INT= ${LIBDESTDIR}/libcc_int.so.262.0
.else
LIBCC_INT= ${LIBDESTDIR}/libcc_int.a
.endif
diff --git a/gnu/usr.bin/cc/c++/Makefile b/gnu/usr.bin/cc/c++/Makefile
index 8eee9cd..5557c62 100644
--- a/gnu/usr.bin/cc/c++/Makefile
+++ b/gnu/usr.bin/cc/c++/Makefile
@@ -1,5 +1,5 @@
#
-# $Id: Makefile,v 1.3 1994/09/18 22:35:43 wollman Exp $
+# $Id$
#
PROG = c++
diff --git a/gnu/usr.bin/cc/cc/Makefile b/gnu/usr.bin/cc/cc/Makefile
index 9c50ab9..8da044c 100644
--- a/gnu/usr.bin/cc/cc/Makefile
+++ b/gnu/usr.bin/cc/cc/Makefile
@@ -1,12 +1,12 @@
#
-# $Id: Makefile,v 1.5 1994/09/18 22:35:46 wollman Exp $
+# $Id$
#
-.PATH: ${.CURDIR}/../cc_int
PROG = cc
-SRCS = gcc.c obstack.c version.c
+SRCS = gcc.c
BINDIR= /usr/bin
-
-LINKS= ${BINDIR}/cc ${BINDIR}/gcc
+.PATH: ${.CURDIR}/../cc_int
+SRCS+= obstack.c version.c
+LINKS= ${BINDIR}/cc ${BINDIR}/gcc
.include <bsd.prog.mk>
diff --git a/gnu/usr.bin/cc/cc/gcc.c b/gnu/usr.bin/cc/cc/gcc.c
index 595f594..cafd0e4 100644
--- a/gnu/usr.bin/cc/cc/gcc.c
+++ b/gnu/usr.bin/cc/cc/gcc.c
@@ -2438,7 +2438,7 @@ process_command (argc, argv)
}
temp = getenv ("LIBRARY_PATH");
- if (temp)
+ if (temp && ! cross_compile)
{
char *startp, *endp;
char *nstore = (char *) alloca (strlen (temp) + 3);
@@ -2470,7 +2470,7 @@ process_command (argc, argv)
/* Use LPATH like LIBRARY_PATH (for the CMU build program). */
temp = getenv ("LPATH");
- if (temp)
+ if (temp && ! cross_compile)
{
char *startp, *endp;
char *nstore = (char *) alloca (strlen (temp) + 3);
diff --git a/gnu/usr.bin/cc/cc1/c-decl.c b/gnu/usr.bin/cc/cc1/c-decl.c
index 995009a..427ff3a 100644
--- a/gnu/usr.bin/cc/cc1/c-decl.c
+++ b/gnu/usr.bin/cc/cc1/c-decl.c
@@ -1698,11 +1698,16 @@ duplicate_decls (newdecl, olddecl)
make_var_volatile (newdecl);
}
- /* Keep source location of definition rather than declaration. */
- if (DECL_INITIAL (newdecl) == 0 && DECL_INITIAL (olddecl) != 0)
+ /* Keep source location of definition rather than declaration.
+ Likewise, keep decl at outer scope. */
+ if ((DECL_INITIAL (newdecl) == 0 && DECL_INITIAL (olddecl) != 0)
+ || (DECL_CONTEXT (newdecl) != 0 && DECL_CONTEXT (olddecl) == 0))
{
DECL_SOURCE_LINE (newdecl) = DECL_SOURCE_LINE (olddecl);
DECL_SOURCE_FILE (newdecl) = DECL_SOURCE_FILE (olddecl);
+
+ if (DECL_CONTEXT (olddecl) == 0)
+ DECL_CONTEXT (newdecl) = 0;
}
/* Merge the unused-warning information. */
diff --git a/gnu/usr.bin/cc/cc_int/Makefile b/gnu/usr.bin/cc/cc_int/Makefile
index 8250850..29c6615 100644
--- a/gnu/usr.bin/cc/cc_int/Makefile
+++ b/gnu/usr.bin/cc/cc_int/Makefile
@@ -1,5 +1,5 @@
#
-# $Id: Makefile,v 1.5 1994/10/25 07:02:23 davidg Exp $
+# $Id$
#
SRCS = aux-output.c bc-emit.c bc-optab.c c-common.c caller-save.c calls.c combine.c convert.c cse.c dbxout.c dwarfout.c emit-rtl.c explow.c expmed.c expr.c final.c flow.c fold-const.c function.c getpwd.c global.c insn-attrtab.c insn-emit.c insn-extract.c insn-opinit.c insn-output.c insn-peep.c insn-recog.c integrate.c jump.c local-alloc.c loop.c obstack.c optabs.c print-rtl.c print-tree.c real.c recog.c reg-stack.c regclass.c reload.c reload1.c reorg.c rtl.c rtlanal.c sched.c sdbout.c stmt.c stor-layout.c stupid.c toplev.c tree.c unroll.c varasm.c version.c xcoffout.c
@@ -7,7 +7,7 @@ LIB = cc_int
NOPROFILE= yes
.if defined(SHARED_LIBCC_INT)
INTERNALLIB=
-SHLIB_MAJOR=261
+SHLIB_MAJOR=262
SHLIB_MINOR=0
.else
diff --git a/gnu/usr.bin/cc/cc_int/aux-output.c b/gnu/usr.bin/cc/cc_int/aux-output.c
index de569b6..17dd9db 100644
--- a/gnu/usr.bin/cc/cc_int/aux-output.c
+++ b/gnu/usr.bin/cc/cc_int/aux-output.c
@@ -2819,7 +2819,7 @@ save_386_machine_status (p)
struct function *p;
{
p->machine = (struct machine_function *) xmalloc (sizeof i386_stack_locals);
- bcopy (i386_stack_locals, p->machine->i386_stack_locals,
+ bcopy ((char *) i386_stack_locals, (char *) p->machine->i386_stack_locals,
sizeof i386_stack_locals);
}
@@ -2827,7 +2827,7 @@ void
restore_386_machine_status (p)
struct function *p;
{
- bcopy (p->machine->i386_stack_locals, i386_stack_locals,
+ bcopy ((char *) p->machine->i386_stack_locals, (char *) i386_stack_locals,
sizeof i386_stack_locals);
free (p->machine);
}
diff --git a/gnu/usr.bin/cc/cc_int/bc-emit.c b/gnu/usr.bin/cc/cc_int/bc-emit.c
index 55e4fe4..c8d50bb 100644
--- a/gnu/usr.bin/cc/cc_int/bc-emit.c
+++ b/gnu/usr.bin/cc/cc_int/bc-emit.c
@@ -867,7 +867,7 @@ bc_emit_bytecode (bytecode)
char byte;
static int prev_lineno = -1;
- byte = bytecode;
+ byte = (char) bytecode;
#ifdef BCDEBUG_PRINT_CODE
if (lineno != prev_lineno)
diff --git a/gnu/usr.bin/cc/cc_int/c-common.c b/gnu/usr.bin/cc/cc_int/c-common.c
index efc5fcb..6735b5a 100644
--- a/gnu/usr.bin/cc/cc_int/c-common.c
+++ b/gnu/usr.bin/cc/cc_int/c-common.c
@@ -215,7 +215,8 @@ decl_attributes (decl, attributes)
for (a = attributes; a; a = TREE_CHAIN (a))
if (!(name = TREE_VALUE (a)))
continue;
- else if (name == get_identifier ("packed"))
+ else if (name == get_identifier ("packed")
+ || name == get_identifier ("__packed__"))
{
if (TREE_CODE (decl) == FIELD_DECL)
DECL_PACKED (decl) = 1;
@@ -226,7 +227,9 @@ decl_attributes (decl, attributes)
}
else if (TREE_VALUE (a) == get_identifier ("noreturn")
- || TREE_VALUE (a) == get_identifier ("volatile"))
+ || TREE_VALUE (a) == get_identifier ("__noreturn__")
+ || TREE_VALUE (a) == get_identifier ("volatile")
+ || TREE_VALUE (a) == get_identifier ("__volatile__"))
{
if (TREE_CODE (decl) == FUNCTION_DECL)
TREE_THIS_VOLATILE (decl) = 1;
@@ -240,7 +243,8 @@ decl_attributes (decl, attributes)
warning_with_decl (decl, "`%s' attribute ignored",
IDENTIFIER_POINTER (TREE_VALUE (a)));
}
- else if (TREE_VALUE (a) == get_identifier ("const"))
+ else if (TREE_VALUE (a) == get_identifier ("const")
+ || TREE_VALUE (a) == get_identifier ("__const__"))
{
if (TREE_CODE (decl) == FUNCTION_DECL)
TREE_READONLY (decl) = 1;
@@ -253,7 +257,8 @@ decl_attributes (decl, attributes)
else
warning_with_decl (decl, "`const' attribute ignored");
}
- else if (TREE_VALUE (a) == get_identifier ("transparent_union"))
+ else if (TREE_VALUE (a) == get_identifier ("transparent_union")
+ || TREE_VALUE (a) == get_identifier ("__transparent_union__"))
{
if (TREE_CODE (decl) == PARM_DECL
&& TREE_CODE (type) == UNION_TYPE
@@ -286,7 +291,8 @@ found_attr:;
IDENTIFIER_POINTER (name));
}
else if ( args = TREE_CHAIN(name),
- !strcmp (IDENTIFIER_POINTER (name = TREE_PURPOSE (name)), "mode")
+ (!strcmp (IDENTIFIER_POINTER (name = TREE_PURPOSE (name)), "mode")
+ || !strcmp (IDENTIFIER_POINTER (name), "__mode__"))
&& list_length (args) == 1
&& TREE_CODE (TREE_VALUE (args)) == IDENTIFIER_NODE)
{
@@ -313,7 +319,8 @@ found_attr:;
if (i == NUM_MACHINE_MODES)
error_with_decl (decl, "unknown machine mode `%s'", specified_name);
}
- else if (!strcmp (IDENTIFIER_POINTER (name), "section")
+ else if ((!strcmp (IDENTIFIER_POINTER (name), "section")
+ || !strcmp (IDENTIFIER_POINTER (name), "__section__"))
&& list_length (args) == 1
&& TREE_CODE (TREE_VALUE (args)) == STRING_CST)
{
@@ -340,7 +347,8 @@ found_attr:;
error_with_decl (decl, "section attributes are not supported for this target");
#endif
}
- else if (!strcmp (IDENTIFIER_POINTER (name), "aligned")
+ else if ((!strcmp (IDENTIFIER_POINTER (name), "aligned")
+ || !strcmp (IDENTIFIER_POINTER (name), "__aligned__"))
&& list_length (args) == 1
&& TREE_CODE (TREE_VALUE (args)) == INTEGER_CST)
{
@@ -372,7 +380,8 @@ found_attr:;
else
DECL_ALIGN (decl) = align;
}
- else if (!strcmp (IDENTIFIER_POINTER (name), "format")
+ else if ((!strcmp (IDENTIFIER_POINTER (name), "format")
+ || !strcmp (IDENTIFIER_POINTER (name), "__format__"))
&& list_length (args) == 3
&& TREE_CODE (TREE_VALUE (args)) == IDENTIFIER_NODE
&& TREE_CODE (TREE_VALUE (TREE_CHAIN (args))) == INTEGER_CST
@@ -394,9 +403,11 @@ found_attr:;
continue;
}
- if (!strcmp (IDENTIFIER_POINTER (format_type), "printf"))
+ if (!strcmp (IDENTIFIER_POINTER (format_type), "printf")
+ || !strcmp (IDENTIFIER_POINTER (format_type), "__printf__"))
is_scan = 0;
- else if (!strcmp (IDENTIFIER_POINTER (format_type), "scanf"))
+ else if (!strcmp (IDENTIFIER_POINTER (format_type), "scanf")
+ || !strcmp (IDENTIFIER_POINTER (format_type), "__scanf__"))
is_scan = 1;
else
{
@@ -508,7 +519,7 @@ typedef struct {
/* Type of argument if length modifier `l' is used.
If NULL, then this modifier is not allowed. */
tree *llen;
- /* Type of argument if length modifier `q' is used.
+ /* Type of argument if length modifier `q' or `ll' is used.
If NULL, then this modifier is not allowed. */
tree *qlen;
/* Type of argument if length modifier `L' is used.
@@ -519,8 +530,8 @@ typedef struct {
} format_char_info;
static format_char_info print_char_table[] = {
- { "di", 0, T_I, T_I, T_L, T_LL, NULL, "-wp0 +" },
- { "oxX", 0, T_UI, T_UI, T_UL, T_ULL, NULL, "-wp0#" },
+ { "di", 0, T_I, T_I, T_L, T_LL, T_LL, "-wp0 +" },
+ { "oxX", 0, T_UI, T_UI, T_UL, T_ULL, T_ULL, "-wp0#" },
{ "u", 0, T_UI, T_UI, T_UL, T_ULL, NULL, "-wp0" },
/* Two GNU extensions. */
{ "Z", 0, T_ST, NULL, NULL, NULL, NULL, "-wp0" },
@@ -536,8 +547,8 @@ static format_char_info print_char_table[] = {
};
static format_char_info scan_char_table[] = {
- { "di", 1, T_I, T_S, T_L, T_LL, NULL, "*" },
- { "ouxX", 1, T_UI, T_US, T_UL, T_ULL, NULL, "*" },
+ { "di", 1, T_I, T_S, T_L, T_LL, T_LL, "*" },
+ { "ouxX", 1, T_UI, T_US, T_UL, T_ULL, T_ULL, "*" },
{ "efgEG", 1, T_F, NULL, T_D, NULL, T_LD, "*" },
{ "sc", 1, T_C, NULL, T_W, NULL, NULL, "*a" },
{ "[", 1, T_C, NULL, NULL, NULL, NULL, "*a" },
@@ -895,6 +906,8 @@ check_format_info (info, params)
length_char = *format_chars++;
else
length_char = 0;
+ if (length_char == 'l' && *format_chars == 'l')
+ length_char = 'q', format_chars++;
aflag = 0;
if (*format_chars == 'a')
{
diff --git a/gnu/usr.bin/cc/cc_int/calls.c b/gnu/usr.bin/cc/cc_int/calls.c
index 2002322..2d58770 100644
--- a/gnu/usr.bin/cc/cc_int/calls.c
+++ b/gnu/usr.bin/cc/cc_int/calls.c
@@ -3065,7 +3065,10 @@ store_one_arg (arg, argblock, may_be_alloca, variable_size, fndecl,
but PCC has one, so this will avoid some problems. */
emit_queue ();
- /* Free any temporary slots made in processing this argument. */
+ /* Free any temporary slots made in processing this argument. Show
+ that we might have taken the address of something and pushed that
+ as an operand. */
+ preserve_temp_slots (NULL_RTX);
free_temp_slots ();
pop_temp_slots ();
diff --git a/gnu/usr.bin/cc/cc_int/combine.c b/gnu/usr.bin/cc/cc_int/combine.c
index 4399bb0..8ab1547 100644
--- a/gnu/usr.bin/cc/cc_int/combine.c
+++ b/gnu/usr.bin/cc/cc_int/combine.c
@@ -1835,8 +1835,13 @@ try_combine (i3, i2, i1)
if (split_code == MULT
&& GET_CODE (XEXP (*split, 1)) == CONST_INT
&& (i = exact_log2 (INTVAL (XEXP (*split, 1)))) >= 0)
- SUBST (*split, gen_rtx_combine (ASHIFT, split_mode,
- XEXP (*split, 0), GEN_INT (i)));
+ {
+ SUBST (*split, gen_rtx_combine (ASHIFT, split_mode,
+ XEXP (*split, 0), GEN_INT (i)));
+ /* Update split_code because we may not have a multiply
+ anymore. */
+ split_code = GET_CODE (*split);
+ }
#ifdef INSN_SCHEDULING
/* If *SPLIT is a paradoxical SUBREG, when we split it, it should
diff --git a/gnu/usr.bin/cc/cc_int/expmed.c b/gnu/usr.bin/cc/cc_int/expmed.c
index b5c19aa..5961123 100644
--- a/gnu/usr.bin/cc/cc_int/expmed.c
+++ b/gnu/usr.bin/cc/cc_int/expmed.c
@@ -2740,7 +2740,9 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp)
case TRUNC_DIV_EXPR:
if (op1_is_constant && HOST_BITS_PER_WIDE_INT >= size)
{
- if (unsignedp)
+ if (unsignedp
+ || (INTVAL (op1)
+ == (HOST_WIDE_INT) 1 << (GET_MODE_BITSIZE (compute_mode) - 1)))
{
unsigned HOST_WIDE_INT mh, ml;
int pre_shift, post_shift;
@@ -2901,6 +2903,8 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp)
tquotient, 0);
}
+ /* We have computed OP0 / abs(OP1). If OP1 is negative, negate
+ the quotient. */
if (d < 0)
{
insn = get_last_insn ();
diff --git a/gnu/usr.bin/cc/cc_int/function.c b/gnu/usr.bin/cc/cc_int/function.c
index 821d61a..844af83 100644
--- a/gnu/usr.bin/cc/cc_int/function.c
+++ b/gnu/usr.bin/cc/cc_int/function.c
@@ -839,6 +839,7 @@ assign_stack_temp (mode, size, keep)
plus_constant (XEXP (best_p->slot, 0),
rounded_size));
p->address = 0;
+ p->rtl_expr = 0;
p->next = temp_slots;
temp_slots = p;
@@ -1098,14 +1099,14 @@ preserve_rtl_expr_result (x)
if (x == 0 || GET_CODE (x) != MEM || CONSTANT_P (XEXP (x, 0)))
return;
- /* If we can find a match, move it to our level. */
- for (p = temp_slots; p; p = p->next)
- if (p->in_use && rtx_equal_p (x, p->slot))
- {
- p->level = temp_slot_level;
- p->rtl_expr = 0;
- return;
- }
+ /* If we can find a match, move it to our level unless it is already at
+ an upper level. */
+ p = find_temp_slot_from_address (XEXP (x, 0));
+ if (p != 0)
+ {
+ p->level = MIN (p->level, temp_slot_level);
+ p->rtl_expr = 0;
+ }
return;
}
diff --git a/gnu/usr.bin/cc/cc_int/real.c b/gnu/usr.bin/cc/cc_int/real.c
index cad4343..f3e22a7 100644
--- a/gnu/usr.bin/cc/cc_int/real.c
+++ b/gnu/usr.bin/cc/cc_int/real.c
@@ -246,15 +246,15 @@ unknown arithmetic type
#define NE 6
#define MAXDECEXP 4932
#define MINDECEXP -4956
-#define GET_REAL(r,e) bcopy (r, e, 2*NE)
-#define PUT_REAL(e,r) bcopy (e, r, 2*NE)
+#define GET_REAL(r,e) bcopy ((char *) r, (char *) e, 2*NE)
+#define PUT_REAL(e,r) bcopy ((char *) e, (char *) r, 2*NE)
#else /* no XFmode */
#if LONG_DOUBLE_TYPE_SIZE == 128
#define NE 10
#define MAXDECEXP 4932
#define MINDECEXP -4977
-#define GET_REAL(r,e) bcopy (r, e, 2*NE)
-#define PUT_REAL(e,r) bcopy (e, r, 2*NE)
+#define GET_REAL(r,e) bcopy ((char *) r, (char *) e, 2*NE)
+#define PUT_REAL(e,r) bcopy ((char *) e, (char *) r, 2*NE)
#else
#define NE 6
#define MAXDECEXP 4932
diff --git a/gnu/usr.bin/cc/cc_int/reg-stack.c b/gnu/usr.bin/cc/cc_int/reg-stack.c
index f52b288..df45dd4 100644
--- a/gnu/usr.bin/cc/cc_int/reg-stack.c
+++ b/gnu/usr.bin/cc/cc_int/reg-stack.c
@@ -225,9 +225,8 @@ static rtx FP_mode_reg[FIRST_PSEUDO_REGISTER][(int) MAX_MACHINE_MODE];
definition are validity of this information. */
#define BLOCK_NUM(INSN) \
- (((INSN_UID (INSN) > max_uid) \
- ? (int *)(abort() , 0) \
- : block_number)[INSN_UID (INSN)])
+ ((INSN_UID (INSN) > max_uid) \
+ ? (abort() , -1) : block_number[INSN_UID (INSN)])
extern rtx forced_labels;
extern rtx gen_jump ();
@@ -368,8 +367,8 @@ reg_to_stack (first, file)
block_stack_in = (stack) alloca (blocks * sizeof (struct stack_def));
block_out_reg_set = (HARD_REG_SET *) alloca (blocks * sizeof (HARD_REG_SET));
- bzero (block_stack_in, blocks * sizeof (struct stack_def));
- bzero (block_out_reg_set, blocks * sizeof (HARD_REG_SET));
+ bzero ((char *) block_stack_in, blocks * sizeof (struct stack_def));
+ bzero ((char *) block_out_reg_set, blocks * sizeof (HARD_REG_SET));
block_number = (int *) alloca ((max_uid + 1) * sizeof (int));
@@ -819,7 +818,7 @@ record_asm_reg_life (insn, regstack, operands, constraints,
Also enforce rule #5: Output operands must start at the top of
the reg-stack: output operands may not "skip" a reg. */
- bzero (reg_used_as_output, sizeof (reg_used_as_output));
+ bzero ((char *) reg_used_as_output, sizeof (reg_used_as_output));
for (i = 0; i < n_outputs; i++)
if (STACK_REG_P (operands[i]))
if (reg_class_size[(int) operand_class[i]] != 1)
@@ -852,7 +851,7 @@ record_asm_reg_life (insn, regstack, operands, constraints,
to the top of the reg-stack than any input that is not implicitly
popped. */
- bzero (implicitly_dies, sizeof (implicitly_dies));
+ bzero ((char *) implicitly_dies, sizeof (implicitly_dies));
for (i = first_input; i < first_input + n_inputs; i++)
if (STACK_REG_P (operands[i]))
{
@@ -1216,7 +1215,7 @@ find_blocks (first)
label_value_list);
}
- BLOCK_NUM (insn) = block;
+ block_number[INSN_UID (insn)] = block;
if (code != NOTE)
prev_code = code;
@@ -2342,7 +2341,7 @@ subst_asm_stack_regs (insn, regstack, operands, operands_loc, constraints,
}
}
- bcopy (regstack, &temp_stack, sizeof (temp_stack));
+ bcopy ((char *) regstack, (char *) &temp_stack, sizeof (temp_stack));
/* Put the input regs into the desired place in TEMP_STACK. */
diff --git a/gnu/usr.bin/cc/cc_int/reload1.c b/gnu/usr.bin/cc/cc_int/reload1.c
index d6dadf2..49a1811 100644
--- a/gnu/usr.bin/cc/cc_int/reload1.c
+++ b/gnu/usr.bin/cc/cc_int/reload1.c
@@ -1329,10 +1329,10 @@ reload (first, global, dumpfile)
need only in the smallest class in which it
is required. */
- bcopy (insn_needs.other.regs[0], basic_needs,
- sizeof basic_needs);
- bcopy (insn_needs.other.groups, basic_groups,
- sizeof basic_groups);
+ bcopy ((char *) insn_needs.other.regs[0],
+ (char *) basic_needs, sizeof basic_needs);
+ bcopy ((char *) insn_needs.other.groups,
+ (char *) basic_groups, sizeof basic_groups);
for (i = 0; i < N_REG_CLASSES; i++)
{
diff --git a/gnu/usr.bin/cc/cc_int/version.c b/gnu/usr.bin/cc/cc_int/version.c
index 1c3fd1b..5928315 100644
--- a/gnu/usr.bin/cc/cc_int/version.c
+++ b/gnu/usr.bin/cc/cc_int/version.c
@@ -1 +1 @@
-char *version_string = "2.6.1";
+char *version_string = "2.6.2";
diff --git a/gnu/usr.bin/cc/cccp/Makefile b/gnu/usr.bin/cc/cccp/Makefile
index 0bbc198..43ec78c 100644
--- a/gnu/usr.bin/cc/cccp/Makefile
+++ b/gnu/usr.bin/cc/cccp/Makefile
@@ -2,9 +2,10 @@
# $Id$
#
-.PATH: ${.CURDIR}/../cc_int
PROG = cpp
-SRCS = cccp.c cexp.c obstack.c version.c
+SRCS = cccp.c cexp.c
BINDIR= /usr/libexec
+.PATH: ${.CURDIR}/../cc_int
+SRCS+= obstack.c version.c
.include <bsd.prog.mk>
diff --git a/gnu/usr.bin/cc/cpp/Makefile b/gnu/usr.bin/cc/cpp/Makefile
index 0bbc198..43ec78c 100644
--- a/gnu/usr.bin/cc/cpp/Makefile
+++ b/gnu/usr.bin/cc/cpp/Makefile
@@ -2,9 +2,10 @@
# $Id$
#
-.PATH: ${.CURDIR}/../cc_int
PROG = cpp
-SRCS = cccp.c cexp.c obstack.c version.c
+SRCS = cccp.c cexp.c
BINDIR= /usr/libexec
+.PATH: ${.CURDIR}/../cc_int
+SRCS+= obstack.c version.c
.include <bsd.prog.mk>
diff --git a/gnu/usr.bin/cc/cpp/cccp.c b/gnu/usr.bin/cc/cpp/cccp.c
index d514466..609249b 100644
--- a/gnu/usr.bin/cc/cpp/cccp.c
+++ b/gnu/usr.bin/cc/cpp/cccp.c
@@ -604,14 +604,14 @@ static struct default_include {
automatically in Makefile.in. */
{ CROSS_INCLUDE_DIR, 0, 0 },
/* This is another place that the target system's headers might be. */
- { TOOL_INCLUDE_DIR, 0, 1 },
+ { TOOL_INCLUDE_DIR, 0, 0 },
#else /* not CROSS_COMPILE */
/* This should be /usr/local/include and should come before
the fixincludes-fixed header files. */
{ LOCAL_INCLUDE_DIR, 0, 1 },
/* This is here ahead of GCC_INCLUDE_DIR because assert.h goes here.
Likewise, behind LOCAL_INCLUDE_DIR, where glibc puts its assert.h. */
- { TOOL_INCLUDE_DIR, 0, 1 },
+ { TOOL_INCLUDE_DIR, 0, 0 },
/* This is the dir for fixincludes. Put it just before
the files that we fix. */
{ GCC_INCLUDE_DIR, 0, 0 },
@@ -3275,10 +3275,10 @@ startagain:
/* This is now known to be a macro call.
Discard the macro name from the output,
along with any following whitespace just copied,
- but preserve newlines at the top level since this
+ but preserve newlines if not outputting marks since this
is more likely to do the right thing with line numbers. */
obp = op->buf + obufp_before_macroname;
- if (ip->macro != 0)
+ if (output_marks)
op->lineno = op_lineno_before_macroname;
else {
int newlines = op->lineno - op_lineno_before_macroname;
@@ -9031,16 +9031,18 @@ dump_single_macro (hp, of)
concat = 0;
for (ap = defn->pattern; ap != NULL; ap = ap->next) {
dump_defn_1 (defn->expansion, offset, ap->nchars, of);
- if (ap->nchars != 0)
- concat = 0;
offset += ap->nchars;
- if (ap->stringify)
- fprintf (of, " #");
- if (ap->raw_before && !concat)
- fprintf (of, " ## ");
- concat = 0;
+ if (!traditional) {
+ if (ap->nchars != 0)
+ concat = 0;
+ if (ap->stringify)
+ fprintf (of, " #");
+ if (ap->raw_before && !concat)
+ fprintf (of, " ## ");
+ concat = 0;
+ }
dump_arg_n (defn, ap->argno, of);
- if (ap->raw_after) {
+ if (!traditional && ap->raw_after) {
fprintf (of, " ## ");
concat = 1;
}
@@ -9069,7 +9071,7 @@ dump_all_macros ()
/* Output to OF a substring of a macro definition.
BASE is the beginning of the definition.
Output characters START thru LENGTH.
- Discard newlines outside of strings, thus
+ Unless traditional, discard newlines outside of strings, thus
converting funny-space markers to ordinary spaces. */
static void
@@ -9082,16 +9084,20 @@ dump_defn_1 (base, start, length, of)
U_CHAR *p = base + start;
U_CHAR *limit = base + start + length;
- while (p < limit) {
- if (*p == '\"' || *p =='\'') {
- U_CHAR *p1 = skip_quoted_string (p, limit, 0, NULL_PTR,
- NULL_PTR, NULL_PTR);
- fwrite (p, p1 - p, 1, of);
- p = p1;
- } else {
- if (*p != '\n')
- putc (*p, of);
- p++;
+ if (traditional)
+ fwrite (p, sizeof (*p), length, of);
+ else {
+ while (p < limit) {
+ if (*p == '\"' || *p =='\'') {
+ U_CHAR *p1 = skip_quoted_string (p, limit, 0, NULL_PTR,
+ NULL_PTR, NULL_PTR);
+ fwrite (p, sizeof (*p), p1 - p, of);
+ p = p1;
+ } else {
+ if (*p != '\n')
+ putc (*p, of);
+ p++;
+ }
}
}
}
diff --git a/gnu/usr.bin/cc/include/bc-arity.h b/gnu/usr.bin/cc/include/bc-arity.h
index d311745..c75c040 100644
--- a/gnu/usr.bin/cc/include/bc-arity.h
+++ b/gnu/usr.bin/cc/include/bc-arity.h
@@ -2,16 +2,16 @@
{ 1, 0, 0, {0}},
{ 1, 2, 0, {0}},
{ 1, 2, 0, {0}},
-{ 0, 0, 1, {SIcode, }},
-{ 0, 0, 1, {SIcode, }},
-{ 0, 1, 1, {QIcode, }},
-{ 0, 1, 1, {HIcode, }},
-{ 0, 1, 1, {SIcode, }},
-{ 0, 1, 1, {DIcode, }},
-{ 0, 1, 1, {SFcode, }},
-{ 0, 1, 1, {DFcode, }},
-{ 0, 1, 1, {XFcode, }},
-{ 0, 1, 1, {Pcode, }},
+{ 0, 0, 1, {(char) SIcode, }},
+{ 0, 0, 1, {(char) SIcode, }},
+{ 0, 1, 1, {(char) QIcode, }},
+{ 0, 1, 1, {(char) HIcode, }},
+{ 0, 1, 1, {(char) SIcode, }},
+{ 0, 1, 1, {(char) DIcode, }},
+{ 0, 1, 1, {(char) SFcode, }},
+{ 0, 1, 1, {(char) DFcode, }},
+{ 0, 1, 1, {(char) XFcode, }},
+{ 0, 1, 1, {(char) Pcode, }},
{ 1, 1, 0, {0}},
{ 1, 1, 0, {0}},
{ 1, 1, 0, {0}},
@@ -30,10 +30,10 @@
{ 2, 0, 0, {0}},
{ 3, 0, 0, {0}},
{ 2, 0, 0, {0}},
-{ 1, 1, 1, {SIcode, }},
+{ 1, 1, 1, {(char) SIcode, }},
{ 1, 1, 0, {0}},
-{ 0, 1, 1, {SIcode, }},
-{ 0, 1, 1, {SIcode, }},
+{ 0, 1, 1, {(char) SIcode, }},
+{ 0, 1, 1, {(char) SIcode, }},
{ 1, 1, 0, {0}},
{ 1, 1, 0, {0}},
{ 1, 1, 0, {0}},
@@ -218,15 +218,15 @@
{ 2, 1, 0, {0}},
{ 2, 1, 0, {0}},
{ 4, 1, 0, {0}},
-{ 1, 0, 1, {SIcode, }},
-{ 1, 0, 1, {SIcode, }},
-{ 0, 0, 1, {SIcode, }},
+{ 1, 0, 1, {(char) SIcode, }},
+{ 1, 0, 1, {(char) SIcode, }},
+{ 0, 0, 1, {(char) SIcode, }},
{ 0, 0, 0, {0}},
-{ 1, 0, 3, {SIcode, SIcode, SIcode, }},
-{ 1, 0, 3, {SIcode, SIcode, SIcode, }},
-{ 1, 0, 3, {SIcode, SIcode, SIcode, }},
-{ 1, 0, 3, {SIcode, SIcode, SIcode, }},
+{ 1, 0, 3, {(char) SIcode, (char) SIcode, (char) SIcode, }},
+{ 1, 0, 3, {(char) SIcode, (char) SIcode, (char) SIcode, }},
+{ 1, 0, 3, {(char) SIcode, (char) SIcode, (char) SIcode, }},
+{ 1, 0, 3, {(char) SIcode, (char) SIcode, (char) SIcode, }},
{ 3, 0, 0, {0}},
{ 0, 1, 0, {0}},
{ 0, 0, 0, {0}},
-{ 0, 0, 1, {SIcode, }},
+{ 0, 0, 1, {(char) SIcode, }},
diff --git a/gnu/usr.bin/cc/include/obstack.h b/gnu/usr.bin/cc/include/obstack.h
index a5db1a0..28bcd44 100644
--- a/gnu/usr.bin/cc/include/obstack.h
+++ b/gnu/usr.bin/cc/include/obstack.h
@@ -268,8 +268,11 @@ int obstack_chunk_size (struct obstack *obstack);
#define obstack_blank_fast(h,n) ((h)->next_free += (n))
-#if defined (__GNUC__) && defined (__STDC__)
-#if __GNUC__ < 2
+#if defined (__GNUC__) && defined (__STDC__) && __STDC__
+/* NextStep 2.0 cc is really gcc 1.93 but it defines __GNUC__ = 2 and
+ does not implement __extension__. But that compiler doesn't define
+ __GNUC_MINOR__. */
+#if __GNUC__ < 2 || (__NeXT__ && !__GNUC_MINOR__)
#define __extension__
#endif
diff --git a/gnu/usr.bin/cc/libgcc/Makefile b/gnu/usr.bin/cc/libgcc/Makefile
index e40c4b4..78e2809 100644
--- a/gnu/usr.bin/cc/libgcc/Makefile
+++ b/gnu/usr.bin/cc/libgcc/Makefile
@@ -1,5 +1,5 @@
#
-# $FreeBSD$
+# $Id$
#
LIB= gcc
OpenPOWER on IntegriCloud