3 extern int fclose (FILE*);
5 #if defined __GNUC__ && __GNUC__ >= 11
6 /* Verify that calling fclose on the result of open_wmemstream doesn't
7 trigger GCC -Wmismatched-dealloc with fclose forward-declared and
8 without <stdio.h> included first (it is included later, in.
9 "tst-memstream1.c"). */
10 #pragma GCC diagnostic push
11 #pragma GCC diagnostic error "-Wmismatched-dealloc"
14 int test_open_wmemstream_no_stdio (void)
19 FILE *f
= open_wmemstream (&buf
, &size
);
24 FILE* (*pf
)(wchar_t**, size_t*) = open_wmemstream
;
27 FILE *f
= pf (&buf
, &size
);
33 #if defined __GNUC__ && __GNUC__ >= 11
34 /* Restore -Wmismatched-dealloc setting. */
35 # pragma GCC diagnostic pop
38 #define CHAR_T wchar_t
40 #define OPEN_MEMSTREAM open_wmemstream
42 #include "tst-memstream1.c"