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, 675 Mass Ave, Cambridge, MA 02139, USA. */
20 /* Make everything that used to go in the text section really go there. */
22 int flag_no_mach_text_sections = 0;
24 #define OPT_STRCMP(opt) (!strncmp (opt, p, sizeof (opt)-1))
26 /* 1 if handle_pragma has been called yet. */
28 static int pragma_initialized;
30 /* Initial setting of `optimize'. */
32 static int initial_optimize_flag;
34 extern char *get_directive_line ();
36 /* Called from check_newline via the macro HANDLE_PRAGMA.
37 FINPUT is the source file input stream. */
40 handle_pragma (finput, get_line_function)
42 char *(*get_line_function) ();
44 register char *p = (*get_line_function) (finput);
46 /* Record initial setting of optimize flag, so we can restore it. */
47 if (!pragma_initialized)
49 pragma_initialized = 1;
50 initial_optimize_flag = optimize;
53 if (OPT_STRCMP ("CC_OPT_ON"))
55 optimize = 1, obey_regdecls = 0;
56 warning ("optimization turned on");
58 else if (OPT_STRCMP ("CC_OPT_OFF"))
60 optimize = 0, obey_regdecls = 1;
61 warning ("optimization turned off");
63 else if (OPT_STRCMP ("CC_OPT_RESTORE"))
65 extern int initial_optimize_flag;
67 if (optimize != initial_optimize_flag)
69 if (initial_optimize_flag)
73 optimize = initial_optimize_flag;
75 warning ("optimization level restored");
77 else if (OPT_STRCMP ("CC_WRITABLE_STRINGS"))
78 flag_writable_strings = 1;
79 else if (OPT_STRCMP ("CC_NON_WRITABLE_STRINGS"))
80 flag_writable_strings = 0;
81 else if (OPT_STRCMP ("CC_NO_MACH_TEXT_SECTIONS"))
82 flag_no_mach_text_sections = 1;