|
|
1.1 root 1: /* Functions for generic NeXT as target machine for GNU C compiler.
2: Copyright (C) 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
3:
4: This file is part of GNU CC.
5:
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)
9: any later version.
10:
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.
15:
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. */
19:
20: /* Make everything that used to go in the text section really go there. */
21:
22: int flag_no_mach_text_sections = 0;
23:
24: #define OPT_STRCMP(opt) (!strncmp (opt, p, sizeof (opt)-1))
25:
26: /* 1 if handle_pragma has been called yet. */
27:
28: static int pragma_initialized;
29:
30: /* Initial setting of `optimize'. */
31:
32: static int initial_optimize_flag;
33:
34: extern char *get_directive_line ();
35:
36: /* Called from check_newline via the macro HANDLE_PRAGMA.
37: FINPUT is the source file input stream. */
38:
39: void
40: handle_pragma (finput, get_line_function)
41: FILE *finput;
42: char *(*get_line_function) ();
43: {
44: register char *p = (*get_line_function) (finput);
45:
46: /* Record initial setting of optimize flag, so we can restore it. */
47: if (!pragma_initialized)
48: {
49: pragma_initialized = 1;
50: initial_optimize_flag = optimize;
51: }
52:
53: if (OPT_STRCMP ("CC_OPT_ON"))
54: {
55: optimize = 1, obey_regdecls = 0;
56: warning ("optimization turned on");
57: }
58: else if (OPT_STRCMP ("CC_OPT_OFF"))
59: {
60: optimize = 0, obey_regdecls = 1;
61: warning ("optimization turned off");
62: }
63: else if (OPT_STRCMP ("CC_OPT_RESTORE"))
64: {
65: extern int initial_optimize_flag;
66:
67: if (optimize != initial_optimize_flag)
68: {
69: if (initial_optimize_flag)
70: obey_regdecls = 0;
71: else
72: obey_regdecls = 1;
73: optimize = initial_optimize_flag;
74: }
75: warning ("optimization level restored");
76: }
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;
83: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.