aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/c90-auto-1.c
blob: f3c476c67756f26b2cef3c04ad55a8ca41e374d0 (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 C23 it
     would have type double.  */
  auto x = 1.5;
  int *p = &x;
}