diff options
author | manu <manu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-08-08 23:57:19 +0000 |
---|---|---|
committer | manu <manu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-08-08 23:57:19 +0000 |
commit | a52d5726b14e904406c69435e6b2955dfdb68735 (patch) | |
tree | 1c66246c77f4b33adec6eca15965b1e2f0bfa4bf /gcc/errors.c | |
parent | 6d8415dfcd06f712738a0ef683f11f3d50b9d356 (diff) | |
download | gcc-a52d5726b14e904406c69435e6b2955dfdb68735.tar.gz |
2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR 36901
* diagnostic.def (DK_PEDWARN, DK_PERMERROR): New.
* diagnostic.c (pedantic_warning_kind, permissive_error_kind):
Moved from diagnostic.h
(diagnostic_report_diagnostic): Return bool. Handle DK_PEDWARN and
DK_PERMERROR.
(emit_diagnostic): New.
(warning0, pedwarn0): Delete.
(warning, warning_at, pedwarn, permerror): Return bool.
* diagnostic.h (pedantic_warning_kind, permissive_error_kind):
Moved to diagnostic.c.
(struct diagnostic_context): Use correct type for
classify_diagnostic.
(diagnostic_report_diagnostic): Update declaration.
(emit_diagnostic): Declare.
* errors.c (warning): Return bool.
* errors.h (warning): Update declaration.
* toplev.h (warning0, pedwarn0): Delete.
(warning, warning_at, pedwarn, permerror): Return bool.
* c-errors.c (pedwarn_c99, pedwarn_c90): Use DK_PEDWARN.
* c-decl.c (locate_old_decl): Delete 'diag' argument. Always use
inform. Update all calls.
(diagnose_mismatched_decls): Check return value of warning/pedwarn
before giving informative note.
(implicit_decl_warning): Likewise.
* c-typeck.c (build_function_call): Likewise.
* tree-sssa.c (warn_uninit): Likewise.
* builtins.c (gimplify_va_arg_expr): Likewise.
fortran/
* f95-lang.c (gfc_mark_addressable): Use "pedwarn (0," instead of
'pedwarn0'.
cp/
* cp-tree.h (struct diagnostic_context, struct diagnostic_info):
Delete forward declarations. Check that toplev.h has not been
included before this file. Include toplev.h and diagnostic.h.
* error.c (cp_cpp_error): Use DK_PEDWARN.
(cxx_incomplete_type_diagnostic): Update declaration.
(cxx_incomplete_type_error): Use DK_ERROR.
* typeck2.c (cxx_incomplete_type_diagnostic): Take a diagnostic_t
as argument. Use emit_diagnostic.
(cxx_incomplete_type_error): Use DK_ERROR.
(add_exception_specifier): Use diagnostic_t instead of custom
codes.
* typeck.c (complete_type_or_else): Update call to
cxx_incomplete_type_diagnostic.
* init.c (build_delete): Likewise.
* call.c (diagnostic_fn_t): Remove unused typedef.
(build_temp): Pass a pointer to diagnostic_t.
(convert_like_real): Use emit_diagnostic.
(joust): Check return value of warning before giving informative
note.
* friend.c (do_friend): Check return value of warning
before giving informative note.
* parser.c (cp_parser_template_id): Likewise.
testsuite/
* gcc.dg/pr36901-1.c: New.
* gcc.dg/pr36901-3.c: New.
* gcc.dg/pr36901-2.c: New.
* gcc.dg/pr36901-4.c: New.
* gcc.dg/pr36901-system.h: New.
* gcc.dg/pr36901.h: New.
* gcc.target/powerpc/altivec-macros.c: Update.
* gcc.target/i386/regparm.c: Update.
* gcc.dg/funcdef-var-1.c: Update.
* gcc.dg/parm-mismatch-1.c: Update.
* gcc.dg/attr-noinline.c: Update.
* gcc.dg/wtr-static-1.c: Update.
* gcc.dg/redecl-11.c: Update.
* gcc.dg/pr27953.c: Update.
* gcc.dg/proto-1.c: Update.
* gcc.dg/decl-3.c: Update.
* gcc.dg/redecl-13.c: Update.
* gcc.dg/pr15360-1.c: Update.
* gcc.dg/redecl-15.c: Update.
* gcc.dg/enum-compat-1.c: Update.
* gcc.dg/dll-3.c: Update.
* gcc.dg/array-5.c: Update.
* gcc.dg/Wredundant-decls-2.c: Update.
* gcc.dg/inline4.c: Update.
* gcc.dg/redecl-2.c: Update.
* gcc.dg/inline-14.c: Update.
* gcc.dg/tls/diag-3.c: Update.
* gcc.dg/funcdef-var-2.c: Update.
* gcc.dg/20041213-1.c: Update.
* gcc.dg/old-style-then-proto-1.c: Update.
* gcc.dg/decl-2.c: Update.
* gcc.dg/redecl-12.c: Update.
* gcc.dg/decl-4.c: Update.
* gcc.dg/Wshadow-1.c: Update.
* gcc.dg/transparent-union-2.c: Update.
* gcc.dg/visibility-7.c: Update.
* gcc.dg/dll-2.c: Update.
* gcc.dg/redecl-16.c: Update.
* gcc.dg/inline1.c: Update.
* gcc.dg/decl-8.c: Update.
* gcc.dg/nested-redef-1.c: Update.
* gcc.dg/inline3.c: Update.
* gcc.dg/redecl-1.c: Update.
* gcc.dg/inline5.c: Update.
* gcc.dg/pr35899.c: Update.
* gcc.dg/noncompile/label-lineno-1.c: Update.
* gcc.dg/noncompile/label-1.c: Update.
* gcc.dg/noncompile/20020220-1.c: Update.
* gcc.dg/noncompile/redecl-1.c: Update.
* gcc.dg/redecl-5.c: Update.
* gcc.dg/qual-return-3.c: Update.
* gcc.dg/label-decl-4.c: Update.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@138893 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/errors.c')
-rw-r--r-- | gcc/errors.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/errors.c b/gcc/errors.c index ec70d55ccb1..a1ccfeff43d 100644 --- a/gcc/errors.c +++ b/gcc/errors.c @@ -40,7 +40,7 @@ int have_error = 0; /* Print a warning message - output produced, but there may be problems. */ -void +bool warning (int opt ATTRIBUTE_UNUSED, const char *format, ...) { va_list ap; @@ -50,6 +50,7 @@ warning (int opt ATTRIBUTE_UNUSED, const char *format, ...) vfprintf (stderr, format, ap); va_end (ap); fputc('\n', stderr); + return true; } |