-
- Downloads
re PR c/1027 (slightly misleading printf format warning)
PR c/1027 * c-lang.c (c_initialize_diagnostics): Move from here ... * c-objc-common.c: ... to here. Include "c-pretty-print.h". (c_tree_printer): Use pretty-printer to format %T. * c-pretty-print.c (pp_c_specifier_qualifier_list): Include space before '*' if not C++. (pp_c_direct_abstract_declarator): Don't try to print array upper bound for flexible array members. * c-tree.h: Include "diagnostic.h". (c_initialize_diagnostics): Declare. * objc/objc-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTICS): Define. * c-format.c (format_type_warning): New function. Improve diagnostics for incorrect format argument types. (check_format_types): Use it. Add two parameters. Use the TYPE_MAIN_VARIANT of wanted_type. (check_format_info_main): Pass new parameters to check_format_types. (struct format_wanted_type): Update comment. testsuite: * gcc.dg/Wswitch-enum.c, gcc.dg/Wswitch.c, gcc.dg/format/branch-1.c, gcc.dg/format/diag-1.c, gcc.dg/format/multattr-3.c, gcc.dg/format/xopen-1.c: Update expected warning text. * gcc.dg/format/diag-2.c: New test. From-SVN: r83965
Showing
- gcc/ChangeLog 21 additions, 0 deletionsgcc/ChangeLog
- gcc/c-format.c 88 additions, 70 deletionsgcc/c-format.c
- gcc/c-lang.c 0 additions, 14 deletionsgcc/c-lang.c
- gcc/c-objc-common.c 32 additions, 7 deletionsgcc/c-objc-common.c
- gcc/c-pretty-print.c 3 additions, 1 deletiongcc/c-pretty-print.c
- gcc/c-tree.h 2 additions, 0 deletionsgcc/c-tree.h
- gcc/objc/objc-lang.c 3 additions, 1 deletiongcc/objc/objc-lang.c
- gcc/testsuite/ChangeLog 9 additions, 0 deletionsgcc/testsuite/ChangeLog
- gcc/testsuite/gcc.dg/Wswitch-enum.c 2 additions, 2 deletionsgcc/testsuite/gcc.dg/Wswitch-enum.c
- gcc/testsuite/gcc.dg/Wswitch.c 1 addition, 1 deletiongcc/testsuite/gcc.dg/Wswitch.c
- gcc/testsuite/gcc.dg/format/branch-1.c 6 additions, 6 deletionsgcc/testsuite/gcc.dg/format/branch-1.c
- gcc/testsuite/gcc.dg/format/diag-1.c 3 additions, 3 deletionsgcc/testsuite/gcc.dg/format/diag-1.c
- gcc/testsuite/gcc.dg/format/diag-2.c 13 additions, 0 deletionsgcc/testsuite/gcc.dg/format/diag-2.c
- gcc/testsuite/gcc.dg/format/multattr-3.c 6 additions, 6 deletionsgcc/testsuite/gcc.dg/format/multattr-3.c
- gcc/testsuite/gcc.dg/format/xopen-1.c 1 addition, 1 deletiongcc/testsuite/gcc.dg/format/xopen-1.c
Loading
Please register or sign in to comment