PIPS
preprocessor-local.h
Go to the documentation of this file.
1 /*
2 
3  $Id: preprocessor-local.h 23662 2023-07-10 11:46:59Z coelho $
4 
5  Copyright 1989-2016 MINES ParisTech
6 
7  This file is part of PIPS.
8 
9  PIPS is free software: you can redistribute it and/or modify it
10  under the terms of the GNU General Public License as published by
11  the Free Software Foundation, either version 3 of the License, or
12  any later version.
13 
14  PIPS is distributed in the hope that it will be useful, but WITHOUT ANY
15  WARRANTY; without even the implied warranty of MERCHANTABILITY or
16  FITNESS FOR A PARTICULAR PURPOSE.
17 
18  See the GNU General Public License for more details.
19 
20  You should have received a copy of the GNU General Public License
21  along with PIPS. If not, see <http://www.gnu.org/licenses/>.
22 
23 */
24 /* Preprocessing and splitting of Fortran and C files
25  */
26 
27 /* the name of the environment variable where source files are searched for. */
28 #define SRCPATH "PIPS_SRCPATH"
29 
30 /* pre-processor and added options from environment
31  */
32 #define CPP_PIPS_ENV "PIPS_CPP"
33 #define CPP_PIPS_OPTIONS_ENV "PIPS_CPP_FLAGS"
34 #define FPP_PIPS_ENV "PIPS_FPP"
35 #define FPP_PIPS_OPTIONS_ENV "PIPS_FPP_FLAGS"
36 
37 /* default preprocessor and basic options
38  * -C: do not discard comments...
39  * -P: inhibit linemakers (# 1 "file.c")
40  * -ffreestanding: ignore "stdc-predef.h"
41  */
42 // alternative values: "gcc -E -C"
43 // force c99 for gcc/clang validation compatibility
44 #define CPP_CPP "cpp -C -std=c99"
45 /* #define CPP_CPPFLAGS " -P -D__PIPS__ -D__HPFC__ " */
46 /* -U__GNUC__ seems to be still useful to avoid spoiling the libC files
47  with too many GCC extensions: */
48 //#define CPP_CPPFLAGS " -D__PIPS__ -D__HPFC__ "
49 #define CPP_CPPFLAGS " -D__PIPS__ -D__HPFC__ -U__GNUC__ "
50 
51 /** The preprocessor to use for Fortran files.
52 
53  Alternative values: "gcc -E -C" or "fpp". The issue with cpp or gcc -E
54  is that they don't undestand Fortran and chokes on unbalanced strings
55  in Fortran comments and so on.
56 */
57 #define FPP_CPP "gfortran -E"
58 
59 /** The default preprocessor flags to use with Fortran files */
60 #define FPP_CPPFLAGS " -P -D__PIPS__ -D__HPFC__ "
61 
62 #define DEFAULT_PIPS_FLINT "gfortran -Wall"
63 
64 /* See necessary definitions in pipsmake-rc.tex */
65 //#define DEFAULT_PIPS_CC "gcc -std=c99 -D__PIPS__ -D__HPFC__ "
66 #define DEFAULT_PIPS_CC "gcc -std=c99 -D__PIPS__ -D__HPFC__ -U__GNUC__ "
67 #define DEFAULT_PIPS_CC_FLAGS " -Wall "
68 
69 /* Define some functions from the .l or .y since cproto cannot dig them out: */
70 void MakeTypedefStack();
71 void ResetTypedefStack();
72 
73 #define csplit_parser_warning(...) \
74  csplit_parser_warning_func(CURRENT_FUNCTION, __FILE__, __LINE__, \
75  __VA_ARGS__)
76 
77 /* symbols exported by lex / yacc */
78 typedef size_t yy_size_t;
79 
80 extern char * splitc_text;
81 extern FILE * splitc_in;
82 extern int splitc_lex();
83 extern int splitc_lex_destroy();
84 extern int splitc_parse();
85 extern void splitc_error(const char*);
int splitc_lex_destroy()
char * splitc_text
Definition: preprocessor.h:178
int splitc_lex()
void splitc_error(const char *)
FILE * splitc_in
Definition: preprocessor.h:174
void MakeTypedefStack()
Define some functions from the .l or .y since cproto cannot dig them out:
Definition: splitc.c:243
void ResetTypedefStack()
Definition: splitc.c:249
int splitc_parse()
size_t yy_size_t
symbols exported by lex / yacc