1 /* Functions for generic NeXT as target machine for GNU C compiler.
2 Copyright (C) 1989, 90-93, 1996 Free Software Foundation, Inc.
4 This file is part of GNU CC.
6 GNU CC 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 2, or (at your option)
11 GNU CC 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 GNU CC; see the file COPYING. If not, write to
18 the Free Software Foundation, 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
23 /* Make everything that used to go in the text section really go there. */
25 int flag_no_mach_text_sections = 0;
27 #define OPT_STRCMP(opt) (!strncmp (opt, p, sizeof (opt)-1))
29 /* 1 if handle_pragma has been called yet. */
31 static int pragma_initialized;
33 /* Initial setting of `optimize'. */
35 static int initial_optimize_flag;
37 extern char *get_directive_line ();
39 /* Called from check_newline via the macro HANDLE_PRAGMA.
40 FINPUT is the source file input stream.
41 CH is the first character after `#pragma'.
42 The result is 1 if the pragma was handled. */
45 handle_pragma (finput, node)
52 /* Record initial setting of optimize flag, so we can restore it. */
53 if (!pragma_initialized)
55 pragma_initialized = 1;
56 initial_optimize_flag = optimize;
59 if (TREE_CODE (node) != IDENTIFIER_NODE)
62 pname = IDENTIFIER_POINTER (node);
64 if (strcmp (pname, "CC_OPT_ON") == 0)
66 optimize = 1, obey_regdecls = 0;
67 warning ("optimization turned on");
70 else if (strcmp (pname, "CC_OPT_OFF") == 0)
72 optimize = 0, obey_regdecls = 1;
73 warning ("optimization turned off");
76 else if (strcmp (pname, "CC_OPT_RESTORE") == 0)
78 extern int initial_optimize_flag;
80 if (optimize != initial_optimize_flag)
82 if (initial_optimize_flag)
86 optimize = initial_optimize_flag;
88 warning ("optimization level restored");
91 else if (strcmp (pname, "CC_WRITABLE_STRINGS") == 0)
92 flag_writable_strings = retval = 1;
93 else if (strcmp (pname, "CC_NON_WRITABLE_STRINGS") == 0)
94 flag_writable_strings = 0, retval = 1;
95 else if (strcmp (pname, "CC_NO_MACH_TEXT_SECTIONS") == 0)
96 flag_no_mach_text_sections = retval = 1;