2011-02-16 03:46:41 +08:00
|
|
|
// RUN: %clang_cc1 %s -verify -fsyntax-only
|
2011-02-12 03:59:54 +08:00
|
|
|
|
|
|
|
void test_storage_class_specs()
|
|
|
|
{
|
|
|
|
static int a; // expected-error {{OpenCL does not support the 'static' storage class specifier}}
|
|
|
|
register int b; // expected-error {{OpenCL does not support the 'register' storage class specifier}}
|
|
|
|
extern int c; // expected-error {{OpenCL does not support the 'extern' storage class specifier}}
|
|
|
|
auto int d; // expected-error {{OpenCL does not support the 'auto' storage class specifier}}
|
2011-10-06 11:01:00 +08:00
|
|
|
|
|
|
|
#pragma OPENCL EXTENSION cl_clang_storage_class_specifiers : enable
|
2015-09-30 22:08:20 +08:00
|
|
|
static int e; // expected-error {{program scope variable must reside in constant address space}}
|
2011-10-06 11:01:00 +08:00
|
|
|
register int f;
|
|
|
|
extern int g;
|
|
|
|
auto int h;
|
2011-02-12 03:59:54 +08:00
|
|
|
}
|