aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/c90-auto-1.c
blob: f00f767c50a7769ad2604ea1d8f38e1f8c46e2b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/* Test auto with implicit int for C90.  */
/* { dg-do compile } */
/* { dg-options "-std=c90 -pedantic-errors" } */

void
f (void)
{
  /* This should have type int following C90 rules, whereas in C2x it
     would have type double.  */
  auto x = 1.5;
  int *p = &x;
}