Skip to content

Builtin prototypes are implicitly defined #33905

@jsonn

Description

@jsonn
Bugzilla Link 34557
Version unspecified
OS All

Extended Description

A common way to do autoconf-style tests for declarations in headers uses the following approach:

int main(void) { (void)strlcpy; return 0; }

This should fail with unknown identifier errors, but currently passes with a implicit prototype warning for GNUish language modes (i.e. gnu89, gnu99 etc). It fails for "unknown" identifiers like strlcpy2. This is a pretty bad error as it can lead to incorrect autodetection of system headers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillaclang:frontendLanguage frontend issues, e.g. anything involving "Sema"

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions