* c-common.c (check_format_info_main): Minor cleanup: move
variables into inner scopes; initialize declarations where
appropriate; don't hardcode "scanf" name on warning for zero
width.
From-SVN: r36929
2000-10-18 Kazu Hirata <kazu@hxi.com>
* config/h8300/h8300.md: Remove an unnecessary sign_extend
expander that is used when not optimizing. Output a tab after
each assembly insns.
From-SVN: r36925
* config/alpha/alpha.h (ASM_OUTPUT_MI_THUNK): Reload gp if needed.
* config/sparc/sparc.h (ASM_OUTPUT_MI_THUNK): Always use call, make
sure linker can relax even the delay slot mov %g1,%o7, fix output
formating.
From-SVN: r36912
2000-10-17 Kazu Hirata <kazu@hxi.com>
* config/h8300/h8300.md: Remove an unnecessary zero_extend
expander that is used when not optimizing. Output a tab after
each assembly insns.
From-SVN: r36911
2000-10-17 Diego Novillo <dnovillo@cygnus.com>
* config/i386/unix.h (ASM_OUTPUT_MI_THUNK): Symbol
_GLOBAL_OFFSET_TABLE should not have a $ prefix when
using -mintel-syntax.
From-SVN: r36906
* c-common.c (FMT_FLAG_DOLLAR_MULTIPLE): Define.
(format_types): Use it for printf.
(maybe_read_dollar_number): Add parameter for the kind of format
involved. Warn for multiple use for arguments if this is
inappropriate for the kind of format involved.
(check_format_info_main): Update calls to maybe_read_dollar_number.
testsuite:
* gcc.dg/format-xopen-1.c: Update comments; adjust for checking
for multiple use of arguments with scanf formats; add tests for
multiple use of arguments.
From-SVN: r36905
2000-10-16 Benjamin Kosnik <bkoz@gnu.org>
Shadow headers would work if libsupc++ was strict about namespaces.
This only possible if g++ maps std::size_t -> size_t. (Hint hint.)
* include/c_std/assert.h: Add guards.
* include/c_std/bits/std_climits.h: Correct typo.
* include/c_std/ctype.h: Remove #error.
* libio/libioP.h: Break up extern "C" bits around includes.
* libio/libio.h: Only include C headers, or else _C_legacy namespaces
will be nested.
* libio/libioP.h: Same here.
From-SVN: r36900
* c-common.h (warn_missing_format_attribute): New variable.
* c-decl.c (warn_missing_format_attribute): New variable.
(c_decode_option): Decode -Wmissing-format-attribute and
-Wno-missing-format-attribute.
* c-common.c (check_function_format): If
-Wmissing-format-attribute, give a warning where a vprintf or
vscanf function is called by a function without its own printf or
scanf attribute.
* toplev.c (documented_lang_options): Add
-Wmissing-format-attribute.
* invoke.texi: Document -Wmissing-format-attribute.
cp:
* decl2.c (warn_missing_format_attribute): New variable.
(lang_decode_option): Decode -Wmissing-format-attribute.
testsuite:
* gcc.dg/format-miss-1.c: New test.
From-SVN: r36897
2000-10-17 Marc Espie <espie@openbsd.org>
* invoke.texi (-shared): Insist on requiring code generation flags
to be used along with -shared, and document the subtle failure that
may occur otherwise.
From-SVN: r36896
* c-common.c (format_check_results): New structure.
(finish_dollar_format_checking): Adjust to take a
format_check_results * parameter.
(check_format_info, check_format_info_recurse,
check_format_info_main): Split check_format_info into three
functions, the main checking going in check_format_info_main.
Recurse when any reduction of the format string argument towards a
string literal is done; go down both branches of a conditional
expression. Don't warn for extra format arguments or empty format
strings if they only occur in some branches of a conditional
expression.
testsuite:
* gcc.dg/format-branch-1.c: New test.
From-SVN: r36883