aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Malcomson <matthew.malcomson@arm.com>2019-11-05 15:36:20 +0000
committerMatthew Malcomson <matmal01@gcc.gnu.org>2019-11-05 15:36:20 +0000
commit3619076a631eac18c0484acf6dff3e5e94b8e251 (patch)
treeeb98f4ed8b06fe97d6c3099a8195b0456f31d6ee
parent81e40f3ae4a35b55ff2733a73d48a2f063aa5721 (diff)
downloadgcc-3619076a631eac18c0484acf6dff3e5e94b8e251.zip
gcc-3619076a631eac18c0484acf6dff3e5e94b8e251.tar.gz
gcc-3619076a631eac18c0484acf6dff3e5e94b8e251.tar.bz2
[mid-end] Fix declared type of personality functions
`build_personality_function` generates a declaration for a personality function. The type it declares for these functions doesn't match the type of the actual personality functions that are defined by the C++ unwinding ABI. This doesn't cause any crashes since the compiler never generates a call to these decl's, and hence the type of the function is never used. Nonetheless, for the sake of consistency and readability we update the type of this declaration. gcc/ChangeLog: 2019-11-05 Matthew Malcomson <matthew.malcomson@arm.com> * expr.c (build_personality_function): Fix generated type to match actual personality functions. From-SVN: r277846
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/expr.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 320b492..2bb973f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@
2019-11-05 Matthew Malcomson <matthew.malcomson@arm.com>
+ * expr.c (build_personality_function): Fix generated type to
+ match actual personality functions.
+
+2019-11-05 Matthew Malcomson <matthew.malcomson@arm.com>
+
* config/aarch64/aarch64.c (aarch64_handle_attr_cpu): Allocate
enough bytes for the NULL character.
diff --git a/gcc/expr.c b/gcc/expr.c
index 12165af..06e934e 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -12554,7 +12554,8 @@ build_personality_function (const char *lang)
name = ACONCAT (("__", lang, "_personality", unwind_and_version, NULL));
- type = build_function_type_list (integer_type_node, integer_type_node,
+ type = build_function_type_list (unsigned_type_node,
+ integer_type_node, integer_type_node,
long_long_unsigned_type_node,
ptr_type_node, ptr_type_node, NULL_TREE);
decl = build_decl (UNKNOWN_LOCATION, FUNCTION_DECL,