struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / src / SDCCattr.h
blob30e02e6608c3dfb34785852c298dc66742439ff9
1 /*-------------------------------------------------------------------------
2 SDCCattr.h - Header file for attributes.
4 Copyright (c) 2021 Philipp Klaus Krause pkk@spth.de
6 This program is free software; you can redistribute it and/or modify it
7 under the terms of the GNU General Public License as published by the
8 Free Software Foundation; either version 2, or (at your option) any
9 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, write to the Free Software
18 Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 -------------------------------------------------------------------------*/
21 #ifndef SDCCATTR_H
22 #define SDCCATTR_H 1
24 struct symbol;
25 typedef struct symbol symbol;
27 typedef enum
29 ATTRIBUTE_NODISCARD = 1,
30 ATTRIBUTE_MAYBE_UNUSED,
31 ATTRIBUTE_DEPRECATED,
32 ATTRIBUTE_FALLTHROUGH,
33 ATTRIBUTE_OTHER
34 } ATTRIBUTE_TOKEN;
36 typedef struct attribute
38 ATTRIBUTE_TOKEN token;
39 char token_string[32];
40 char argument_clause[32];
42 struct attribute *next; // Next attribute in attribute list.
44 attribute;
46 attribute *newAttribute(const symbol *token_sym, const char *argument_clause);
48 #endif