Skip to content

Cannot forward-declare static array #2257

@efriedma-quic

Description

@efriedma-quic
Bugzilla Link 1885
Resolution FIXED
Resolved on Mar 12, 2010 00:57
Version unspecified
OS Linux

Extended Description

Not sure if this is the right component.

gcc -fsyntax-only accepts the following, but clang does not:
static int array[];

Note that gcc also rejects this code with the -pedantic flag enabled.

Found in the ffmpeg source code.

On a side note, the error "variable has incomplete type 'int []'" is a bit obscure. It would be nice if the error actually gave a hint as to why this is an error.

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