1 /* Functions for generic NeXT as target machine for GNU C compiler.
2 Copyright (C) 1989, 1990, 1991, 1992, 1993 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. */
21 /* Make everything that used to go in the text section really go there. */
23 int flag_no_mach_text_sections = 0;
25 #define OPT_STRCMP(opt) (!strncmp (opt, p, sizeof (opt)-1))
27 /* 1 if handle_pragma has been called yet. */
29 static int pragma_initialized;
31 /* Initial setting of `optimize'. */
33 static int initial_optimize_flag;
35 extern char *get_directive_line ();
37 /* Called from check_newline via the macro HANDLE_PRAGMA.
38 FINPUT is the source file input stream. */
41 handle_pragma (finput, get_line_function)
43 char *(*get_line_function) ();
45 register char *p = (*get_line_function) (finput);
47 /* Record initial setting of optimize flag, so we can restore it. */
48 if (!pragma_initialized)
50 pragma_initialized = 1;
51 initial_optimize_flag = optimize;
54 if (OPT_STRCMP ("CC_OPT_ON"))
56 optimize = 1, obey_regdecls = 0;
57 warning ("optimization turned on");
59 else if (OPT_STRCMP ("CC_OPT_OFF"))
61 optimize = 0, obey_regdecls = 1;
62 warning ("optimization turned off");
64 else if (OPT_STRCMP ("CC_OPT_RESTORE"))
66 extern int initial_optimize_flag;
68 if (optimize != initial_optimize_flag)
70 if (initial_optimize_flag)
74 optimize = initial_optimize_flag;
76 warning ("optimization level restored");
78 else if (OPT_STRCMP ("CC_WRITABLE_STRINGS"))
79 flag_writable_strings = 1;
80 else if (OPT_STRCMP ("CC_NON_WRITABLE_STRINGS"))
81 flag_writable_strings = 0;
82 else if (OPT_STRCMP ("CC_NO_MACH_TEXT_SECTIONS"))
83 flag_no_mach_text_sections = 1;