summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/diag-aka-2.c
blob: a4b22429c3cb013dbb351508dc7c72e06e9bb793 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/* Verify that the "aka" descriptions for typedefs are correctly
   quoted (PR 62170).  */

typedef struct s1 t1;

int foo(t1 *); /* { dg-message "expected 't1 \\*' {aka 'struct s1 \\*'} but argument is of type 't2 \\*' {aka 'struct s2 \\*'}" } */

int bar() {
  typedef struct s2 {int i;} t2;
  t2 pos;
  return foo(&pos); /* { dg-error "incompatible pointer type" } */
}