1 /* { dg-do compile } */
2 /* { dg-options "-Wimplicit-function-declaration -fdiagnostics-show-caret" } */
4 typedef struct GtkWidget
{ int dummy
; } GtkWidget
;
6 extern void gtk_widget_show_all (GtkWidget
*w
);
11 gtk_widget_showall (w
); /* { dg-warning "3: implicit declaration of function .gtk_widget_showall.; did you mean .gtk_widget_show_all.?" } */
12 /* { dg-begin-multiline-output "" }
13 gtk_widget_showall (w);
16 { dg-end-multiline-output "" } */
18 /* Ensure we don't try to suggest "gtk_widget_showall" for subsequent
20 gtk_widget_showall_ (w
); /* { dg-warning "3: implicit declaration of function .gtk_widget_showall_.; did you mean .gtk_widget_show_all.?" } */
21 /* { dg-begin-multiline-output "" }
22 gtk_widget_showall_ (w);
25 { dg-end-multiline-output "" } */
27 GtkWidgetShowAll (w
); /* { dg-warning "3: implicit declaration of function .GtkWidgetShowAll.; did you mean .gtk_widget_show_all.?" } */
28 /* { dg-begin-multiline-output "" }
32 { dg-end-multiline-output "" } */
38 return parma
* parma
; /* { dg-error "10: .parma. undeclared .first use in this function.; did you mean .param." } */
39 /* { dg-begin-multiline-output "" }
43 { dg-end-multiline-output "" } */
46 #define MACRO(X) ((X))
51 return MACRAME (i
); /* { dg-warning "10: implicit declaration of function .MACRAME.; did you mean .MACRO.?" } */
52 /* { dg-begin-multiline-output "" }
56 { dg-end-multiline-output "" } */
59 #define IDENTIFIER_POINTER(X) ((X))
64 return IDENTIFIER_PTR (node
); /* { dg-warning "10: implicit declaration of function .IDENTIFIER_PTR.; did you mean .IDENTIFIER_POINTER.?" } */
65 /* { dg-begin-multiline-output "" }
66 return IDENTIFIER_PTR (node);
69 { dg-end-multiline-output "" } */
76 return __LINE_
; /* { dg-error "10: .__LINE_. undeclared .first use in this function.; did you mean .__LINE__." } */
77 /* { dg-begin-multiline-output "" }
81 { dg-end-multiline-output "" } */
85 int array
[MAX_ITEM
]; /* { dg-error "11: .MAX_ITEM. undeclared here .not in a function.; did you mean .MAX_ITEMS." } */
86 /* { dg-begin-multiline-output "" }
90 { dg-end-multiline-output "" } */
103 case FOO_FURST
: /* { dg-error "10: .FOO_FURST. undeclared .first use in this function.; did you mean .FOO_FIRST." } */
105 /* { dg-begin-multiline-output "" }
109 { dg-end-multiline-output "" } */
111 case FOO_SECCOND
: /* { dg-error "10: .FOO_SECCOND. undeclared .first use in this function.; did you mean .FOO_SECOND." } */
113 /* { dg-begin-multiline-output "" }
117 { dg-end-multiline-output "" } */
124 int snprintf (char *, __SIZE_TYPE__
, const char *, ...);
127 test_7 (int i
, int j
)
130 snprint (buffer
, 100, "%i of %i", i
, j
); /* { dg-warning "3: implicit declaration of function .snprint.; did you mean .snprintf.." } */
131 /* { dg-begin-multiline-output "" }
132 snprint (buffer, 100, "%i of %i", i, j);
135 { dg-end-multiline-output "" } */