aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesonbuild/compilers/c_function_attributes.py8
-rw-r--r--test cases/common/204 function attributes/meson.build4
2 files changed, 6 insertions, 6 deletions
diff --git a/mesonbuild/compilers/c_function_attributes.py b/mesonbuild/compilers/c_function_attributes.py
index 9aeaaf2..a522a1a 100644
--- a/mesonbuild/compilers/c_function_attributes.py
+++ b/mesonbuild/compilers/c_function_attributes.py
@@ -91,10 +91,10 @@ C_FUNC_ATTRIBUTES = {
'used':
'int foo(void) __attribute__((used));',
'visibility': '''
- int foo_def(void) __attribute__((visibility(("default"))));
- int foo_hid(void) __attribute__((visibility(("hidden"))));
- int foo_int(void) __attribute__((visibility(("internal"))));
- int foo_pro(void) __attribute__((visibility(("protected"))));''',
+ int foo_def(void) __attribute__((visibility("default")));
+ int foo_hid(void) __attribute__((visibility("hidden")));
+ int foo_int(void) __attribute__((visibility("internal")));
+ int foo_pro(void) __attribute__((visibility("protected")));''',
'warning':
'int foo(void) __attribute__((warning("")));',
'warn_unused_result':
diff --git a/test cases/common/204 function attributes/meson.build b/test cases/common/204 function attributes/meson.build
index c906b49..1e93803 100644
--- a/test cases/common/204 function attributes/meson.build
+++ b/test cases/common/204 function attributes/meson.build
@@ -63,7 +63,7 @@ if host_machine.system() != 'darwin'
attributes += 'visibility'
endif
-if c.get_id() == 'gcc'
+if ['gcc', 'intel'].contains(c.get_id())
# not supported by clang as of 5.0.0 (at least up to 6.0.1)
attributes += 'artificial'
attributes += 'error'
@@ -73,7 +73,7 @@ if c.get_id() == 'gcc'
attributes += 'optimize'
attributes += 'warning'
- if c.version().version_compare('>= 7.0.0')
+ if c.get_id() == 'gcc' and c.version().version_compare('>= 7.0.0')
attributes += 'fallthrough'
endif
endif