HAOUAS Elyes has uploaded this change for review.

View Change

lib/ubsan.c: Drop GCC 5.x compatibility

Currently, coorboot uses GCC-8.

Change-Id: I7387bdb4526cbe2832db9671f0a0df788a65b8c3
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
---
M src/lib/ubsan.c
1 file changed, 3 insertions(+), 8 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/21/45821/1
diff --git a/src/lib/ubsan.c b/src/lib/ubsan.c
index 6873f7e..8c1a5e2 100644
--- a/src/lib/ubsan.c
+++ b/src/lib/ubsan.c
@@ -245,13 +245,8 @@
ABORT_VARIANT_VP_VP(vla_bound_not_positive);

struct ubsan_float_cast_overflow_data {
-/*
-* TODO: Remove this GCC 5.x compatibility after switching to GCC 6.x. The
-* GCC developers accidentally forgot the source location. Their
-* libubsan probes to see if it looks like a path, but we don't need
-* to maintain compatibility with multiple gcc releases. See below.
-*/
-#if !(defined(__GNUC__) && __GNUC__ < 6)
+
+#if !defined(__GNUC__)
struct ubsan_source_location location;
#endif
struct ubsan_type_descriptor *from_type;
@@ -264,7 +259,7 @@
(struct ubsan_float_cast_overflow_data *)data_raw;
ubsan_value_handle_t from = (ubsan_value_handle_t)from_raw;
(void) from;
-#if !(defined(__GNUC__) && __GNUC__ < 6)
+#if !defined(__GNUC__)
ubsan_abort(&data->location, "float cast overflow");
#else
ubsan_abort(((void) data, &unknown_location), "float cast overflow");

To view, visit change 45821. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I7387bdb4526cbe2832db9671f0a0df788a65b8c3
Gerrit-Change-Number: 45821
Gerrit-PatchSet: 1
Gerrit-Owner: HAOUAS Elyes <ehaouas@noos.fr>
Gerrit-MessageType: newchange