aboutsummaryrefslogtreecommitdiff
path: root/clang/test/Sema/attr-nonblocking-sema.c
blob: 0647e47febef2000ce4841dfa9851b945633cef3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// RUN: %clang_cc1 -fsyntax-only -verify -std=c89 %s

// Tests for a few cases involving C functions without prototypes.

void noproto() __attribute__((nonblocking)) // expected-error {{'nonblocking' function must have a prototype}}
{
}

// This will succeed
void noproto(void) __attribute__((blocking));

// A redeclaration isn't any different - a prototype is required.
void f1(void);
void f1() __attribute__((nonblocking)); // expected-error {{'nonblocking' function must have a prototype}}