Skip to content

Commit 9f88deb

Browse files
committed
GCC 5 compat fix for generate-tree-c.py: itk_int128
1 parent 71b79f4 commit 9f88deb

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

generate-tree-c.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -253,13 +253,17 @@ def add_type(c_expr_for_node, typename):
253253
# with macros to look into it of this form:
254254
# #define unsigned_type_node integer_types[itk_unsigned_int]
255255
#
256-
for std_type in ('itk_char', 'itk_signed_char',
257-
'itk_unsigned_char', 'itk_short',
258-
'itk_unsigned_short', 'itk_int',
259-
'itk_unsigned_int', 'itk_long',
260-
'itk_unsigned_long', 'itk_long_long',
261-
'itk_unsigned_long_long', 'itk_int128',
262-
'itk_unsigned_int128'):
256+
std_types = ['itk_char', 'itk_signed_char', 'itk_unsigned_char',
257+
'itk_short', 'itk_unsigned_short',
258+
'itk_int', 'itk_unsigned_int',
259+
'itk_long', 'itk_unsigned_long',
260+
'itk_long_long', 'itk_unsigned_long_long']
261+
if GCC_VERSION < 5000:
262+
# int128 seems to have gone away in
263+
# 9f75f0266e3611513f196c898088e2712a71eaf4, discussed at
264+
# https://gcc.gnu.org/ml/gcc-patches/2014-08/msg01396.html
265+
std_types += ['itk_int128', 'itk_unsigned_int128']
266+
for std_type in std_types:
263267
# strip off the "itk_" prefix
264268
assert std_type.startswith('itk_')
265269
stddef = std_type[4:]

0 commit comments

Comments
 (0)