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
This commit is contained in:
parent
54d262334a
commit
9c3183069b
@ -1,3 +1,20 @@
|
||||
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>
|
||||
|
||||
* bitmap.c (bitmap_element_allocate): Remove unused parameter;
|
||||
|
@ -1,3 +1,10 @@
|
||||
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>
|
||||
|
||||
* call.c (default_parm_conversions): Remove prototype definition.
|
||||
|
79
gcc/getopt.c
79
gcc/getopt.c
@ -6,23 +6,23 @@
|
||||
Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
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
|
||||
Free Software Foundation; either version 2, or (at your option) any
|
||||
later version.
|
||||
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
|
||||
Free Software Foundation; either version 2, or (at your option) any
|
||||
later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
USA. */
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
USA. */
|
||||
|
||||
/* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>.
|
||||
Ditto for AIX 3.2 and <stdlib.h>. */
|
||||
@ -79,12 +79,6 @@ USA. */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined (WIN32) && !defined (__CYGWIN32__)
|
||||
/* It's not Unix, really. See? Capital letters. */
|
||||
#include <windows.h>
|
||||
#define getpid() GetCurrentProcessId()
|
||||
#endif
|
||||
|
||||
#ifndef _
|
||||
/* This is for other GNU distributions with internationalized messages.
|
||||
When compiling libc, the _ macro is predefined. */
|
||||
@ -262,8 +256,6 @@ static int nonoption_flags_len;
|
||||
static int original_argc;
|
||||
static char *const *original_argv;
|
||||
|
||||
extern pid_t __libc_pid;
|
||||
|
||||
/* 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
|
||||
to getopt is that one passed to the process. */
|
||||
@ -276,7 +268,9 @@ store_args_and_env (int argc, char *const *argv)
|
||||
original_argc = argc;
|
||||
original_argv = argv;
|
||||
}
|
||||
# ifdef text_set_element
|
||||
text_set_element (__libc_subinit, store_args_and_env);
|
||||
# endif /* text_set_element */
|
||||
|
||||
# define SWAP_FLAGS(ch1, ch2) \
|
||||
if (nonoption_flags_len > 0) \
|
||||
@ -329,9 +323,9 @@ exchange (argv)
|
||||
nonoption_flags_len = nonoption_flags_max_len = 0;
|
||||
else
|
||||
{
|
||||
memcpy (new_str, __getopt_nonoption_flags, nonoption_flags_max_len);
|
||||
memset (&new_str[nonoption_flags_max_len], '\0',
|
||||
top + 1 - nonoption_flags_max_len);
|
||||
memset (__mempcpy (new_str, __getopt_nonoption_flags,
|
||||
nonoption_flags_max_len),
|
||||
'\0', top + 1 - nonoption_flags_max_len);
|
||||
nonoption_flags_max_len = top + 1;
|
||||
__getopt_nonoption_flags = new_str;
|
||||
}
|
||||
@ -440,11 +434,8 @@ _getopt_initialize (argc, argv, optstring)
|
||||
if (__getopt_nonoption_flags == NULL)
|
||||
nonoption_flags_max_len = -1;
|
||||
else
|
||||
{
|
||||
memcpy (__getopt_nonoption_flags, orig_str, len);
|
||||
memset (&__getopt_nonoption_flags[len], '\0',
|
||||
nonoption_flags_max_len - len);
|
||||
}
|
||||
memset (__mempcpy (__getopt_nonoption_flags, orig_str, len),
|
||||
'\0', nonoption_flags_max_len - len);
|
||||
}
|
||||
}
|
||||
nonoption_flags_len = nonoption_flags_max_len;
|
||||
@ -699,21 +690,23 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
else
|
||||
{
|
||||
if (opterr)
|
||||
if (argv[optind - 1][1] == '-')
|
||||
/* --option */
|
||||
fprintf (stderr,
|
||||
_("%s: option `--%s' doesn't allow an argument\n"),
|
||||
argv[0], pfound->name);
|
||||
else
|
||||
/* +option or -option */
|
||||
fprintf (stderr,
|
||||
_("%s: option `%c%s' doesn't allow an argument\n"),
|
||||
argv[0], argv[optind - 1][0], pfound->name);
|
||||
{
|
||||
if (argv[optind - 1][1] == '-')
|
||||
/* --option */
|
||||
fprintf (stderr,
|
||||
_("%s: option `--%s' doesn't allow an argument\n"),
|
||||
argv[0], pfound->name);
|
||||
else
|
||||
/* +option or -option */
|
||||
fprintf (stderr,
|
||||
_("%s: option `%c%s' doesn't allow an argument\n"),
|
||||
argv[0], argv[optind - 1][0], pfound->name);
|
||||
|
||||
nextchar += strlen (nextchar);
|
||||
nextchar += strlen (nextchar);
|
||||
|
||||
optopt = pfound->val;
|
||||
return '?';
|
||||
optopt = pfound->val;
|
||||
return '?';
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (pfound->has_arg == 1)
|
||||
|
@ -940,14 +940,15 @@ record_asm_reg_life (insn, regstack, operands, constraints,
|
||||
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)
|
||||
{
|
||||
error_for_asm
|
||||
(insn, "Output constraint %d must specify a single register", i);
|
||||
malformed_asm = 1;
|
||||
}
|
||||
else
|
||||
reg_used_as_output[REGNO (operands[i])] = 1;
|
||||
{
|
||||
if (reg_class_size[(int) operand_class[i]] != 1)
|
||||
{
|
||||
error_for_asm (insn, "Output constraint %d must specify a single register", i);
|
||||
malformed_asm = 1;
|
||||
}
|
||||
else
|
||||
reg_used_as_output[REGNO (operands[i])] = 1;
|
||||
}
|
||||
|
||||
|
||||
/* Search for first non-popped reg. */
|
||||
@ -1037,10 +1038,12 @@ record_asm_reg_life (insn, regstack, operands, constraints,
|
||||
rtx op = operands[i];
|
||||
|
||||
if (! STACK_REG_P (op))
|
||||
if (stack_regs_mentioned_p (op))
|
||||
abort ();
|
||||
else
|
||||
continue;
|
||||
{
|
||||
if (stack_regs_mentioned_p (op))
|
||||
abort ();
|
||||
else
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Each destination is dead before this insn. If the
|
||||
destination is not used after this insn, record this with
|
||||
@ -1057,10 +1060,12 @@ record_asm_reg_life (insn, regstack, operands, constraints,
|
||||
for (i = first_input; i < first_input + n_inputs; i++)
|
||||
{
|
||||
if (! STACK_REG_P (operands[i]))
|
||||
if (stack_regs_mentioned_p (operands[i]))
|
||||
abort ();
|
||||
else
|
||||
continue;
|
||||
{
|
||||
if (stack_regs_mentioned_p (operands[i]))
|
||||
abort ();
|
||||
else
|
||||
continue;
|
||||
}
|
||||
|
||||
/* 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,
|
||||
@ -1111,7 +1116,7 @@ record_reg_life_pat (pat, src, dest, douse)
|
||||
}
|
||||
|
||||
/* 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;
|
||||
|
||||
fmt = GET_RTX_FORMAT (GET_CODE (pat));
|
||||
@ -1469,7 +1474,7 @@ stack_reg_life_analysis (first, stackentry)
|
||||
{
|
||||
rtx retvalue;
|
||||
|
||||
if (retvalue = stack_result (current_function_decl))
|
||||
if ((retvalue = stack_result (current_function_decl)))
|
||||
{
|
||||
/* Find all RETURN insns and mark them. */
|
||||
|
||||
@ -3129,7 +3134,7 @@ convert_regs ()
|
||||
value_reg_low = value_reg_high = -1;
|
||||
{
|
||||
rtx retvalue;
|
||||
if (retvalue = stack_result (current_function_decl))
|
||||
if ((retvalue = stack_result (current_function_decl)))
|
||||
{
|
||||
value_reg_low = REGNO (retvalue);
|
||||
value_reg_high = value_reg_low +
|
||||
|
Loading…
Reference in New Issue
Block a user