invoke.texi: Document -Wcast-function-type.
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Thu, 14 Dec 2017 18:59:24 +0000 (18:59 +0000)
committerBernd Edlinger <edlinger@gcc.gnu.org>
Thu, 14 Dec 2017 18:59:24 +0000 (18:59 +0000)
commitc65e18d3331aa9995ddab8527132de706f6d9236
treec07ca2eb9958d996e27a70559a3a4e136ba98e58
parent9d0e85af87d9e7fe3bd68d1647b7c47ad299f011
invoke.texi: Document -Wcast-function-type.

gcc:
2017-12-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        * doc/invoke.texi: Document -Wcast-function-type.
        * recog.h (stored_funcptr): Change signature.
        * tree-dump.c (dump_node): Avoid warning.
        * typed-splay-tree.h (typed_splay_tree): Avoid warning.

libcpp:
2017-12-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        * internal.h (maybe_print_line): Change signature.

c-family:
2017-12-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        * c.opt (Wcast-function-type): New warning option.
        * c-lex.c (get_fileinfo): Avoid warning.
        * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.

c:
2017-12-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        * c-typeck.c (c_safe_arg_type_equiv_p,
        c_safe_function_type_cast_p): New function.
        (build_c_cast): Implement -Wcast-function-type.

cp:
2017-12-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        * decl2.c (start_static_storage_duration_function): Avoid warning.
        * typeck.c (cxx_safe_arg_type_equiv_p,
        cxx_safe_function_type_cast_p): New function.
        (build_reinterpret_cast_1): Implement -Wcast-function-type.

testsuite:
2017-12-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        * c-c++-common/Wcast-function-type.c: New test.
        * g++.dg/Wcast-function-type.C: New test.

From-SVN: r255661
19 files changed:
gcc/ChangeLog
gcc/c-family/ChangeLog
gcc/c-family/c-lex.c
gcc/c-family/c-ppoutput.c
gcc/c-family/c.opt
gcc/c/ChangeLog
gcc/c/c-typeck.c
gcc/cp/ChangeLog
gcc/cp/decl2.c
gcc/cp/typeck.c
gcc/doc/invoke.texi
gcc/recog.h
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/Wcast-function-type.c [new file with mode: 0644]
gcc/testsuite/g++.dg/Wcast-function-type.C [new file with mode: 0644]
gcc/tree-dump.c
gcc/typed-splay-tree.h
libcpp/ChangeLog
libcpp/internal.h