brintos

brintos / llvm-project-archived public Read only

0
0
Text · 394 B · 8bf439d Raw
16 lines · c
1// RUN: %clang_cc1 -std=c89 -fsyntax-only -verify %s2// RUN: %clang_cc1 -std=gnu89 -fsyntax-only -verify %s3// RUN: %clang_cc1 -std=c99 -fsyntax-only -verify %s -DC994 5#ifdef C996// expected-no-diagnostics7#endif8 9void foo(void) {10#ifndef C9911  // expected-warning@+2{{GCC does not allow variable declarations in for loop initializers before C99}}12#endif13  for (int i = 0; i < 10; i++)14    ;15}16