Skip to content

Commit e2542c9

Browse files
ggardetAnthonyBarbier
authored andcommitted
Fix build (#454)
* Fix C++11 syntax. It fixes build with GCC. * Be Python 3.x compatible by replacing print "XXX" by print("XXX")
1 parent b3a371b commit e2542c9

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

SConstruct

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,12 @@ if env['build'] == "embed_only":
7272
Return()
7373

7474
if env['neon'] and 'x86' in env['arch']:
75-
print "Cannot compile NEON for x86"
75+
print("Cannot compile NEON for x86")
7676
Exit(1)
7777

7878
if env['set_soname'] and not version_at_least(SCons.__version__, "2.4"):
79-
print "Setting the library's SONAME / SHLIBVERSION requires SCons 2.4 or above"
80-
print "Update your version of SCons or use set_soname=0"
79+
print("Setting the library's SONAME / SHLIBVERSION requires SCons 2.4 or above")
80+
print("Update your version of SCons or use set_soname=0")
8181
Exit(1)
8282

8383
if env['os'] == 'bare_metal':
@@ -99,7 +99,7 @@ cpp_compiler = os.environ.get('CXX', default_cpp_compiler)
9999
c_compiler = os.environ.get('CC', default_c_compiler)
100100

101101
if env['os'] == 'android' and ( 'clang++' not in cpp_compiler or 'clang' not in c_compiler ):
102-
print "WARNING: Only clang is officially supported to build the Compute Library for Android"
102+
print( "WARNING: Only clang is officially supported to build the Compute Library for Android")
103103

104104
if 'clang++' in cpp_compiler:
105105
env.Append(CXXFLAGS = ['-Wno-format-nonliteral','-Wno-deprecated-increment-bool','-Wno-vla-extension','-Wno-mismatched-tags'])
@@ -111,7 +111,7 @@ if env['cppthreads']:
111111

112112
if env['openmp']:
113113
if 'clang++' in cpp_compiler:
114-
print "Clang does not support OpenMP. Use scheduler=cpp."
114+
print( "Clang does not support OpenMP. Use scheduler=cpp.")
115115
Exit(1)
116116

117117
env.Append(CPPDEFINES = [('ARM_COMPUTE_OPENMP_SCHEDULER', 1)])
@@ -179,10 +179,10 @@ if not GetOption("help"):
179179

180180
if 'clang++' not in cpp_compiler:
181181
if env['arch'] == 'arm64-v8.2-a' and not version_at_least(compiler_ver, '6.2.1'):
182-
print "GCC 6.2.1 or newer is required to compile armv8.2-a code"
182+
print("GCC 6.2.1 or newer is required to compile armv8.2-a code")
183183
Exit(1)
184184
elif env['arch'] == 'arm64-v8a' and not version_at_least(compiler_ver, '4.9'):
185-
print "GCC 4.9 or newer is required to compile NEON code for AArch64"
185+
print("GCC 4.9 or newer is required to compile NEON code for AArch64")
186186
Exit(1)
187187

188188
if version_at_least(compiler_ver, '6.1'):

include/half/half.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ namespace half_float
272272
/// ~~~~
273273
namespace literal
274274
{
275-
half operator""_h(long double);
275+
half operator"" _h(long double);
276276
}
277277
#endif
278278

@@ -1083,7 +1083,7 @@ namespace half_float
10831083
friend struct std::hash<half>;
10841084
#endif
10851085
#if HALF_ENABLE_CPP11_USER_LITERALS
1086-
friend half literal::operator""_h(long double);
1086+
friend half literal::operator"" _h(long double);
10871087
#endif
10881088

10891089
public:
@@ -1196,7 +1196,7 @@ namespace half_float
11961196
/// to rather involved conversions.
11971197
/// \param value literal value
11981198
/// \return half with given value (if representable)
1199-
inline half operator""_h(long double value) { return half(detail::binary, detail::float2half<half::round_style>(value)); }
1199+
inline half operator"" _h(long double value) { return half(detail::binary, detail::float2half<half::round_style>(value)); }
12001200
}
12011201
#endif
12021202

0 commit comments

Comments
 (0)