aboutsummaryrefslogtreecommitdiff
path: root/clang/test/Sema/err-decl-block-extern-no-init.c
blob: 78a8befd0ca78af734ae70bb1913c22e43973271 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fsyntax-only -verify %s
static int x;

void foo(void)
{
    extern int x = 1; // expected-error {{declaration of block scope identifier with linkage cannot have an initializer}}
}

int y;

void bar(void)
{
    extern int y = 1; // expected-error {{declaration of block scope identifier with linkage cannot have an initializer}}

}