2 * Post-installation sanity check for libcdecl.
4 * Copyright © 2023 Nick Bowler
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
20 /* Define configuration macros used in cdecl.h to expand to syntax errors. */
21 #define HAVE__BOOL (0xdeadc0de * "HAVE__BOOL")
27 extern int puts(const char *);
29 struct cdecl_declarator decl_array, decl_null = {0};
30 struct cdecl_declspec spec = {0, CDECL_TYPE_INT};
31 struct cdecl decl = {0, &spec, &decl_array};
34 decl_array.child = &decl_null;
35 decl_array.type = CDECL_DECL_ARRAY;
36 decl_array.u.array.length = 1234567890;
37 decl_array.u.array.vla = NULL;
39 cdecl_explain(buf, sizeof buf, &decl);