aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/cpp/misspelled-directive-2.c
blob: 7ec5dee9024e3e76b48b8ea092bbd10cba7fff76 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* { dg-options "-fdiagnostics-show-caret" } */

#endfi /* { dg-error "invalid preprocessing directive #endfi; did you mean #endif?" } */

/* Verify that we offer fix-it hints.  */
/* { dg-begin-multiline-output "" }
 #endfi
  ^~~~~
  endif
  { dg-end-multiline-output "" } */

/* Test coverage for the case of an unrecognized directive where no suggestion
   is offered.  */

#this_does_not_match_anything /* { dg-error "invalid preprocessing directive #this_does_not_match_anything" } */
/* { dg-begin-multiline-output "" }
 #this_does_not_match_anything
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  { dg-end-multiline-output "" } */

int make_non_empty;