1 /* { dg-do compile } */
2 /* { dg-options "-fdiagnostics-show-caret" } */
4 typedef struct GtkWidget { int dummy; } GtkWidget;
6 extern void gtk_widget_show_all (GtkWidget *w);
12 gtk_widget_showall (w); // { dg-error "3: 'gtk_widget_showall' was not declared in this scope; did you mean 'gtk_widget_show_all'\\?" }
13 /* { dg-begin-multiline-output "" }
14 gtk_widget_showall (w);
17 { dg-end-multiline-output "" } */
19 /* Ensure we don't try to suggest "gtk_widget_showall" for subsequent
21 gtk_widget_showall_ (w); // { dg-error "3: 'gtk_widget_showall_' was not declared in this scope; did you mean 'gtk_widget_show_all'\\?" }
22 /* { dg-begin-multiline-output "" }
23 gtk_widget_showall_ (w);
26 { dg-end-multiline-output "" } */
28 GtkWidgetShowAll (w); // { dg-error "3: 'GtkWidgetShowAll' was not declared in this scope; did you mean 'gtk_widget_show_all'\\?" }
29 /* { dg-begin-multiline-output "" }
33 { dg-end-multiline-output "" } */
39 return parma * parma; // { dg-error "10: 'parma' was not declared in this scope; did you mean 'param'\\?" }
40 /* { dg-begin-multiline-output "" }
44 { dg-end-multiline-output "" } */
47 #define MACRO(X) ((X))
52 return MACRAME (i); // { dg-error "10: 'MACRAME' was not declared in this scope; did you mean 'MACRO'\\?" }
53 /* { dg-begin-multiline-output "" }
57 { dg-end-multiline-output "" } */
60 #define IDENTIFIER_POINTER(X) ((X))
65 return IDENTIFIER_PTR (node); // { dg-error "10: 'IDENTIFIER_PTR' was not declared in this scope; did you mean 'IDENTIFIER_POINTER'\\?" }
66 /* { dg-begin-multiline-output "" }
67 return IDENTIFIER_PTR (node);
70 { dg-end-multiline-output "" } */
77 return __LINE_; /* { dg-error "10: '__LINE_' was not declared in this scope; did you mean '__LINE__'\\?" }
78 /* { dg-begin-multiline-output "" }
82 { dg-end-multiline-output "" } */
86 int array[MAX_ITEM]; // { dg-error "11: 'MAX_ITEM' was not declared in this scope; did you mean 'MAX_ITEMS'\\?" }
87 /* { dg-begin-multiline-output "" }
91 { dg-end-multiline-output "" } */
104 case FOO_FURST: // { dg-error "10: 'FOO_FURST' was not declared in this scope; did you mean 'FOO_FIRST'\\?" }
106 /* { dg-begin-multiline-output "" }
110 { dg-end-multiline-output "" } */
112 case FOO_SECCOND: // { dg-error "10: 'FOO_SECCOND' was not declared in this scope; did you mean 'FOO_SECOND'\\?" }
114 /* { dg-begin-multiline-output "" }
118 { dg-end-multiline-output "" } */
125 int snprintf (char *, __SIZE_TYPE__, const char *, ...);
128 test_7 (int i, int j)
131 snprint (buffer, 100, "%i of %i", i, j); // { dg-error "3: 'snprint' was not declared in this scope; did you mean 'snprintf'\\?" }
132 /* { dg-begin-multiline-output "" }
133 snprint (buffer, 100, "%i of %i", i, j);
136 { dg-end-multiline-output "" } */
144 return locale; // { dg-error "10: 'locale' was not declared in this scope; did you mean 'local'\\?" }
145 /* { dg-begin-multiline-output "" }
149 { dg-end-multiline-output "" } */
155 int test_method_1 ();
161 class sub : public base
164 int test_method_2 ();
167 int base::test_method_1 ()
169 return m_food; // { dg-error "10: 'm_food' was not declared in this scope; did you mean 'm_foo'\\?" }
170 /* { dg-begin-multiline-output "" }
174 { dg-end-multiline-output "" } */
177 int sub::test_method_2 ()
179 return m_food; // { dg-error "10: 'm_food' was not declared in this scope; did you mean 'm_foo'\\?" }
180 /* { dg-begin-multiline-output "" }
184 { dg-end-multiline-output "" } */