Skip to content

Implicit int error when using with Clang #52

@jakurzak

Description

@jakurzak

When configuring using amdclang on OLCF machines, I get:

configure: flink.c:1:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
main(){ FF(); return 0; }
^
int
flink.c:1:9: error: call to undeclared function 'f_fun'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
main(){ FF(); return 0; }
        ^
<command line>:1:12: note: expanded from here
#define FF f_fun
           ^
2 errors generated.
configure: error: giving up

which can be remedied by changing

echo "main(){ FF(); return 0; }" > flink.c

to

echo "int main(){ int FF(); return 0; }" > flink.c

in configure and configure.ac

Any reason not to?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions