diff options
author | edlinger <edlinger@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-11-21 14:17:05 +0000 |
---|---|---|
committer | edlinger <edlinger@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-11-21 14:17:05 +0000 |
commit | f1b3e1c9e011344e640faafea61fb79748a7aca5 (patch) | |
tree | 2aa8fba617d40e3e606b3bdf3e74fb9eda06ff81 /gcc/lto | |
parent | da26967101f8f141f13e13d2cbc6cfd82f476150 (diff) | |
download | gcc-f1b3e1c9e011344e640faafea61fb79748a7aca5.tar.gz |
gcc:
2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR c++/71973
* doc/invoke.texi (-Wno-builtin-declaration-mismatch): Document the
new default-enabled warning..
* builtin-types.def (BT_CONST_TM_PTR): New primitive type.
(BT_PTR_CONST_STRING): Updated.
(BT_FN_SIZE_STRING_SIZE_CONST_STRING_CONST_PTR): Removed.
(BT_FN_SIZE_STRING_SIZE_CONST_STRING_CONST_TM_PTR): New function type.
* builtins.def (DEF_TM_BUILTIN): Disable BOTH_P for TM builtins.
(strftime): Update builtin function.
* tree-core.h (TI_CONST_TM_PTR_TYPE): New enum value.
* tree.h (const_tm_ptr_type_node): New type node.
* tree.c (free_lang_data, build_common_tree_nodes): Initialize
const_tm_ptr_type_node.
c-family:
2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR c++/71973
* c.opt (-Wbuiltin-declaration-mismatch): New warning.
* c-common.c (c_common_nodes_and_builtins): Initialize
const_tm_ptr_type_node.
c:
2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR c++/71973
* c-decl.c (diagnose_mismatched_decls): Use
OPT_Wbuiltin_declaration_mismatch here too.
cp:
2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR c++/71973
* decl.c (duplicate_decls): Warn when a built-in function is redefined.
Don't overload builtin functions with C++ functions.
Handle const_tm_ptr_type_node like file_ptr_node.
Copy the TREE_NOTHROW flag unmodified to the old decl.
lto:
2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR c++/71973
* lto-lang.c (lto_init): Assert const_tm_ptr_type_node is sane.
testsuite:
2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR c++/71973
* g++.dg/pr71973-1.C: New test.
* g++.dg/pr71973-2.C: New test.
* g++.dg/pr71973-3.C: New test.
* g++.dg/lto/pr68811_0.C: Add -w to first lto-options.
* g++.dg/lookup/extern-c-redecl4.C: Adjust test expectations.
* g++.old-deja/g++.mike/p700.C: Add -Wno-builtin-declaration-mismatch
to dg-options.
* g++.old-deja/g++.other/realloc.C: Likewise.
* g++.old-deja/g++.other/builtins10.C: Adjust test expectations.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@242662 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lto')
-rw-r--r-- | gcc/lto/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/lto/lto-lang.c | 4 |
2 files changed, 11 insertions, 2 deletions
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index 447c9698c15..732fc8a53ec 100644 --- a/gcc/lto/ChangeLog +++ b/gcc/lto/ChangeLog @@ -1,6 +1,11 @@ +2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de> + + PR c++/71973 + * lto-lang.c (lto_init): Assert const_tm_ptr_type_node is sane. + 2016-11-18 Richard Sandiford <richard.sandiford@arm.com> - Alan Hayward <alan.hayward@arm.com> - David Sherwood <david.sherwood@arm.com> + Alan Hayward <alan.hayward@arm.com> + David Sherwood <david.sherwood@arm.com> * lto.c (offload_handle_link_vars): Use SET_DECL_MODE. diff --git a/gcc/lto/lto-lang.c b/gcc/lto/lto-lang.c index 301cf2124a6..a5f04ba8e72 100644 --- a/gcc/lto/lto-lang.c +++ b/gcc/lto/lto-lang.c @@ -1266,6 +1266,10 @@ lto_init (void) always use the C definition here in lto1. */ gcc_assert (fileptr_type_node == ptr_type_node); gcc_assert (TYPE_MAIN_VARIANT (fileptr_type_node) == ptr_type_node); + /* Likewise for const struct tm*. */ + gcc_assert (const_tm_ptr_type_node == const_ptr_type_node); + gcc_assert (TYPE_MAIN_VARIANT (const_tm_ptr_type_node) + == const_ptr_type_node); ptrdiff_type_node = integer_type_node; |