xref: /netbsd-src/external/gpl3/gdb.old/dist/gdb/testsuite/gdb.base/style.c (revision 7bdf38e5b7a28439665f2fdeff81e36913eef7dd)
1 
2 
3 /* The leading newlines here are intentional, do not remove.  They are used to
4    test that the source highlighter doesn't strip them.  */
5 /* Copyright 2018-2023 Free Software Foundation, Inc.
6 
7    This program is free software; you can redistribute it and/or modify
8    it under the terms of the GNU General Public License as published by
9    the Free Software Foundation; either version 3 of the License, or
10    (at your option) any later version.
11 
12    This program is distributed in the hope that it will be useful,
13    but WITHOUT ANY WARRANTY; without even the implied warranty of
14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15    GNU General Public License for more details.
16 
17    You should have received a copy of the GNU General Public License
18    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
19 
20 #define SOME_MACRO 23
21 
22 enum etype
23 {
24   VALUE_ONE = 1,
25   VALUE_TWO = 2
26 };
27 
28 struct some_struct
29 {
30   int int_field;
31   char *string_field;
32   enum etype e_field;
33 };
34 
35 struct some_struct struct_value = { 23, "skidoo", VALUE_TWO };
36 
37 struct just_bitfield
38 {
39   unsigned int field : 3;
40 };
41 
42 struct just_bitfield just_bitfield_value = { 4 };
43 
44 int some_called_function (void)
45 {
46   return 0;
47 }
48 
49 int
50 main (int argc, char **argv)
51 {
52   return some_called_function (); /* break here */
53 }
54