brintos

brintos / llvm-project-archived public Read only

0
0
Text · 689 B · c4da8b3 Raw
14 lines · c
1// RUN: %clang_cc1 -fsyntax-only -verify=gnu -std=gnu17 %s2// RUN: %clang_cc1 -fsyntax-only -verify=gnu -std=gnu2x %s3// RUN: %clang_cc1 -fsyntax-only -verify=std -std=c17 %s4// RUN: %clang_cc1 -fsyntax-only -verify=std -std=c2x %s5 6// std-no-diagnostics7 8// 'index' is a builtin library function, but only in GNU mode. So this should9// give an error in GNU modes but be okay in non-GNU mode.10// FIXME: the error is correct, but these notes are pretty awful.11int index; // gnu-error {{redefinition of 'index' as different kind of symbol}} \12              gnu-note {{unguarded header; consider using #ifdef guards or #pragma once}} \13              gnu-note {{previous definition is here}}14