1 /* Pragma related interfaces. 2 Copyright (C) 1995, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 3 Free Software Foundation, Inc. 4 5 This file is part of GCC. 6 7 GCC is free software; you can redistribute it and/or modify it under 8 the terms of the GNU General Public License as published by the Free 9 Software Foundation; either version 2, or (at your option) any later 10 version. 11 12 GCC is distributed in the hope that it will be useful, but WITHOUT ANY 13 WARRANTY; without even the implied warranty of MERCHANTABILITY or 14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 for more details. 16 17 You should have received a copy of the GNU General Public License 18 along with GCC; see the file COPYING. If not, write to the Free 19 Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 20 02110-1301, USA. */ 21 22 #ifndef GCC_C_PRAGMA_H 23 #define GCC_C_PRAGMA_H 24 25 #include <cpplib.h> /* For enum cpp_ttype. */ 26 27 /* Cause the `yydebug' variable to be defined. */ 28 #define YYDEBUG 1 29 extern int yydebug; 30 31 extern struct cpp_reader* parse_in; 32 33 #define HANDLE_PRAGMA_WEAK SUPPORTS_WEAK 34 35 #ifdef HANDLE_SYSV_PRAGMA 36 /* We always support #pragma pack for SYSV pragmas. */ 37 #ifndef HANDLE_PRAGMA_PACK 38 #define HANDLE_PRAGMA_PACK 1 39 #endif 40 #endif /* HANDLE_SYSV_PRAGMA */ 41 42 43 #ifdef HANDLE_PRAGMA_PACK_PUSH_POP 44 /* If we are supporting #pragma pack(push... then we automatically 45 support #pragma pack(<n>) */ 46 #define HANDLE_PRAGMA_PACK 1 47 #endif /* HANDLE_PRAGMA_PACK_PUSH_POP */ 48 49 /* It's safe to always leave visibility pragma enabled as if 50 visibility is not supported on the host OS platform the 51 statements are ignored. */ 52 #define HANDLE_PRAGMA_VISIBILITY 1 53 54 extern void init_pragma (void); 55 56 /* Front-end wrappers for pragma registration to avoid dragging 57 cpplib.h in almost everywhere. */ 58 extern void c_register_pragma (const char *, const char *, 59 void (*) (struct cpp_reader *)); 60 extern void c_register_pragma_with_expansion (const char *, const char *, 61 void (*) (struct cpp_reader *)); 62 extern void maybe_apply_pragma_weak (tree); 63 extern void maybe_apply_pending_pragma_weaks (void); 64 extern tree maybe_apply_renaming_pragma (tree, tree); 65 extern void add_to_renaming_pragma_list (tree, tree); 66 67 extern enum cpp_ttype c_lex (tree *); 68 extern enum cpp_ttype c_lex_with_flags (tree *, location_t *, unsigned char *); 69 70 /* If 1, then lex strings into the execution character set. 71 If 0, lex strings into the host character set. 72 If -1, lex both, and chain them together, such that the former 73 is the TREE_CHAIN of the latter. */ 74 extern int c_lex_string_translate; 75 76 /* If true, strings should be passed to the caller of c_lex completely 77 unmolested (no concatenation, no translation). */ 78 extern bool c_lex_return_raw_strings; 79 80 #endif /* GCC_C_PRAGMA_H */ 81