Commit 9c318306 by Manfred Hollstein Committed by Manfred Hollstein

d

In gcc/:
	* i386.h (RTX_COSTS): Insert braces around nested if.
	(ADDITIONAL_REGISTER_NAMES): Insert braces around structured
	elements.
	* gcc.c (default_compilers): Properly put brackets around array elements in
	initializer.
	* getopt.c (_getopt_internal): Add explicit braces around nested if;
	reformatted.
	* reg-stack.c (record_asm_reg_life): Add explicit braces around nested if's.
	(record_reg_life_pat): Add explicit parens around && and || in expression.
	(stack_reg_life_analysis): Add parens around assignment used as expression.
	(convert_regs): Likewise.
In gcc/cp/:
	* lang-specs.h: Properly put brackets around array elements in initializer.
	* typeck.c (build_binary_op_nodefault): Correctly place parens around
	&& and || in expression.
In gcc/f/:
	* lang-specs.h: Properly put brackets around array elements in initializer.

From-SVN: r18500
parent 54d26233
Thu Mar 12 09:39:40 1998 Manfred Hollstein <manfred@s-direktnet.de>
* i386.h (RTX_COSTS): Insert braces around nested if.
(ADDITIONAL_REGISTER_NAMES): Insert braces around structured
elements.
* gcc.c (default_compilers): Properly put brackets around array elements in
initializer.
* getopt.c (_getopt_internal): Add explicit braces around nested if;
reformatted.
* reg-stack.c (record_asm_reg_life): Add explicit braces around nested if's.
(record_reg_life_pat): Add explicit parens around && and || in expression.
(stack_reg_life_analysis): Add parens around assignment used as expression.
(convert_regs): Likewise.
Thu Mar 12 09:25:29 1998 Manfred Hollstein <manfred@s-direktnet.de> Thu Mar 12 09:25:29 1998 Manfred Hollstein <manfred@s-direktnet.de>
* bitmap.c (bitmap_element_allocate): Remove unused parameter; * bitmap.c (bitmap_element_allocate): Remove unused parameter;
......
Thu Mar 12 09:39:40 1998 Manfred Hollstein <manfred@s-direktnet.de>
* lang-specs.h: Properly put brackets around array elements in initializer.
* typeck.c (build_binary_op_nodefault): Correctly place parens around
&& and || in expression.
Thu Mar 12 09:26:04 1998 Manfred Hollstein <manfred@s-direktnet.de> Thu Mar 12 09:26:04 1998 Manfred Hollstein <manfred@s-direktnet.de>
* call.c (default_parm_conversions): Remove prototype definition. * call.c (default_parm_conversions): Remove prototype definition.
......
...@@ -6,23 +6,23 @@ ...@@ -6,23 +6,23 @@
Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97 Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97
Free Software Foundation, Inc. Free Software Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C Library. NOTE: The canonical source of this file is maintained with the GNU C Library.
Bugs can be reported to bug-glibc@prep.ai.mit.edu. Bugs can be reported to bug-glibc@prep.ai.mit.edu.
This program is free software; you can redistribute it and/or modify it This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any Free Software Foundation; either version 2, or (at your option) any
later version. later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA. */ USA. */
/* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>. /* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>.
Ditto for AIX 3.2 and <stdlib.h>. */ Ditto for AIX 3.2 and <stdlib.h>. */
...@@ -79,12 +79,6 @@ USA. */ ...@@ -79,12 +79,6 @@ USA. */
#endif #endif
#endif #endif
#if defined (WIN32) && !defined (__CYGWIN32__)
/* It's not Unix, really. See? Capital letters. */
#include <windows.h>
#define getpid() GetCurrentProcessId()
#endif
#ifndef _ #ifndef _
/* This is for other GNU distributions with internationalized messages. /* This is for other GNU distributions with internationalized messages.
When compiling libc, the _ macro is predefined. */ When compiling libc, the _ macro is predefined. */
...@@ -262,8 +256,6 @@ static int nonoption_flags_len; ...@@ -262,8 +256,6 @@ static int nonoption_flags_len;
static int original_argc; static int original_argc;
static char *const *original_argv; static char *const *original_argv;
extern pid_t __libc_pid;
/* Make sure the environment variable bash 2.0 puts in the environment /* Make sure the environment variable bash 2.0 puts in the environment
is valid for the getopt call we must make sure that the ARGV passed is valid for the getopt call we must make sure that the ARGV passed
to getopt is that one passed to the process. */ to getopt is that one passed to the process. */
...@@ -276,7 +268,9 @@ store_args_and_env (int argc, char *const *argv) ...@@ -276,7 +268,9 @@ store_args_and_env (int argc, char *const *argv)
original_argc = argc; original_argc = argc;
original_argv = argv; original_argv = argv;
} }
# ifdef text_set_element
text_set_element (__libc_subinit, store_args_and_env); text_set_element (__libc_subinit, store_args_and_env);
# endif /* text_set_element */
# define SWAP_FLAGS(ch1, ch2) \ # define SWAP_FLAGS(ch1, ch2) \
if (nonoption_flags_len > 0) \ if (nonoption_flags_len > 0) \
...@@ -329,9 +323,9 @@ exchange (argv) ...@@ -329,9 +323,9 @@ exchange (argv)
nonoption_flags_len = nonoption_flags_max_len = 0; nonoption_flags_len = nonoption_flags_max_len = 0;
else else
{ {
memcpy (new_str, __getopt_nonoption_flags, nonoption_flags_max_len); memset (__mempcpy (new_str, __getopt_nonoption_flags,
memset (&new_str[nonoption_flags_max_len], '\0', nonoption_flags_max_len),
top + 1 - nonoption_flags_max_len); '\0', top + 1 - nonoption_flags_max_len);
nonoption_flags_max_len = top + 1; nonoption_flags_max_len = top + 1;
__getopt_nonoption_flags = new_str; __getopt_nonoption_flags = new_str;
} }
...@@ -440,11 +434,8 @@ _getopt_initialize (argc, argv, optstring) ...@@ -440,11 +434,8 @@ _getopt_initialize (argc, argv, optstring)
if (__getopt_nonoption_flags == NULL) if (__getopt_nonoption_flags == NULL)
nonoption_flags_max_len = -1; nonoption_flags_max_len = -1;
else else
{ memset (__mempcpy (__getopt_nonoption_flags, orig_str, len),
memcpy (__getopt_nonoption_flags, orig_str, len); '\0', nonoption_flags_max_len - len);
memset (&__getopt_nonoption_flags[len], '\0',
nonoption_flags_max_len - len);
}
} }
} }
nonoption_flags_len = nonoption_flags_max_len; nonoption_flags_len = nonoption_flags_max_len;
...@@ -699,6 +690,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) ...@@ -699,6 +690,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
else else
{ {
if (opterr) if (opterr)
{
if (argv[optind - 1][1] == '-') if (argv[optind - 1][1] == '-')
/* --option */ /* --option */
fprintf (stderr, fprintf (stderr,
...@@ -716,6 +708,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) ...@@ -716,6 +708,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
return '?'; return '?';
} }
} }
}
else if (pfound->has_arg == 1) else if (pfound->has_arg == 1)
{ {
if (optind < argc) if (optind < argc)
......
...@@ -940,14 +940,15 @@ record_asm_reg_life (insn, regstack, operands, constraints, ...@@ -940,14 +940,15 @@ record_asm_reg_life (insn, regstack, operands, constraints,
bzero ((char *) 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++) for (i = 0; i < n_outputs; i++)
if (STACK_REG_P (operands[i])) if (STACK_REG_P (operands[i]))
{
if (reg_class_size[(int) operand_class[i]] != 1) if (reg_class_size[(int) operand_class[i]] != 1)
{ {
error_for_asm error_for_asm (insn, "Output constraint %d must specify a single register", i);
(insn, "Output constraint %d must specify a single register", i);
malformed_asm = 1; malformed_asm = 1;
} }
else else
reg_used_as_output[REGNO (operands[i])] = 1; reg_used_as_output[REGNO (operands[i])] = 1;
}
/* Search for first non-popped reg. */ /* Search for first non-popped reg. */
...@@ -1037,10 +1038,12 @@ record_asm_reg_life (insn, regstack, operands, constraints, ...@@ -1037,10 +1038,12 @@ record_asm_reg_life (insn, regstack, operands, constraints,
rtx op = operands[i]; rtx op = operands[i];
if (! STACK_REG_P (op)) if (! STACK_REG_P (op))
{
if (stack_regs_mentioned_p (op)) if (stack_regs_mentioned_p (op))
abort (); abort ();
else else
continue; continue;
}
/* Each destination is dead before this insn. If the /* Each destination is dead before this insn. If the
destination is not used after this insn, record this with destination is not used after this insn, record this with
...@@ -1057,10 +1060,12 @@ record_asm_reg_life (insn, regstack, operands, constraints, ...@@ -1057,10 +1060,12 @@ record_asm_reg_life (insn, regstack, operands, constraints,
for (i = first_input; i < first_input + n_inputs; i++) for (i = first_input; i < first_input + n_inputs; i++)
{ {
if (! STACK_REG_P (operands[i])) if (! STACK_REG_P (operands[i]))
{
if (stack_regs_mentioned_p (operands[i])) if (stack_regs_mentioned_p (operands[i]))
abort (); abort ();
else else
continue; continue;
}
/* If an input is dead after the insn, record a death note. /* If an input is dead after the insn, record a death note.
But don't record a death note if there is already a death note, But don't record a death note if there is already a death note,
...@@ -1111,7 +1116,7 @@ record_reg_life_pat (pat, src, dest, douse) ...@@ -1111,7 +1116,7 @@ record_reg_life_pat (pat, src, dest, douse)
} }
/* We don't need to consider either of these cases. */ /* We don't need to consider either of these cases. */
if (GET_CODE (pat) == USE && !douse || GET_CODE (pat) == CLOBBER) if ((GET_CODE (pat) == USE && !douse) || GET_CODE (pat) == CLOBBER)
return; return;
fmt = GET_RTX_FORMAT (GET_CODE (pat)); fmt = GET_RTX_FORMAT (GET_CODE (pat));
...@@ -1469,7 +1474,7 @@ stack_reg_life_analysis (first, stackentry) ...@@ -1469,7 +1474,7 @@ stack_reg_life_analysis (first, stackentry)
{ {
rtx retvalue; rtx retvalue;
if (retvalue = stack_result (current_function_decl)) if ((retvalue = stack_result (current_function_decl)))
{ {
/* Find all RETURN insns and mark them. */ /* Find all RETURN insns and mark them. */
...@@ -3129,7 +3134,7 @@ convert_regs () ...@@ -3129,7 +3134,7 @@ convert_regs ()
value_reg_low = value_reg_high = -1; value_reg_low = value_reg_high = -1;
{ {
rtx retvalue; rtx retvalue;
if (retvalue = stack_result (current_function_decl)) if ((retvalue = stack_result (current_function_decl)))
{ {
value_reg_low = REGNO (retvalue); value_reg_low = REGNO (retvalue);
value_reg_high = value_reg_low + value_reg_high = value_reg_low +
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment