Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8457aab

Browse files
committed
BUG: fix check_gcc_function_attribute when attribute is actually supported.
1 parent 6b03099 commit 8457aab

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

numpy/distutils/command/autodist.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,7 @@ def check_compiler_gcc4(cmd):
4646
def check_gcc_function_attribute(cmd, attribute, name):
4747
"""Return True if the given function attribute is supported."""
4848
cmd._check_compiler()
49-
body = """
50-
int %s %s(void*);
51-
52-
int
53-
main()
54-
{
55-
}
56-
""" % (attribute, name)
49+
body = "int %s %s(void*);" % (attribute, name)
5750
ret, output = cmd.try_output_compile(body, None, None)
5851
if not ret or len(output) > 0:
5952
return False

0 commit comments

Comments
 (0)