source: trunk/third/gcc/config/nextstep.c @ 8834

Revision 8834, 2.4 KB checked in by ghudson, 28 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r8833, which included commits to RCS files with non-trunk default branches.
Line 
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
4This file is part of GNU CC.
5
6GNU CC is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 2, or (at your option)
9any later version.
10
11GNU CC is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with GNU CC; see the file COPYING.  If not, write to
18the Free Software Foundation, 59 Temple Place - Suite 330,
19Boston, MA 02111-1307, USA.  */
20
21/* Make everything that used to go in the text section really go there.  */
22
23int flag_no_mach_text_sections = 0;
24
25#define OPT_STRCMP(opt) (!strncmp (opt, p, sizeof (opt)-1))
26
27/* 1 if handle_pragma has been called yet.  */
28
29static int pragma_initialized;
30
31/* Initial setting of `optimize'.  */
32
33static int initial_optimize_flag;
34
35extern char *get_directive_line ();
36
37/* Called from check_newline via the macro HANDLE_PRAGMA.
38   FINPUT is the source file input stream.  */
39
40void
41handle_pragma (finput, get_line_function)
42     FILE *finput;
43     char *(*get_line_function) ();
44{
45  register char *p = (*get_line_function) (finput);
46
47  /* Record initial setting of optimize flag, so we can restore it.  */
48  if (!pragma_initialized)
49    {
50      pragma_initialized = 1;
51      initial_optimize_flag = optimize;
52    }
53
54  if (OPT_STRCMP ("CC_OPT_ON"))
55    {
56      optimize = 1, obey_regdecls = 0;
57      warning ("optimization turned on");
58    }
59  else if (OPT_STRCMP ("CC_OPT_OFF"))
60    {
61      optimize = 0, obey_regdecls = 1;
62      warning ("optimization turned off");
63    }
64  else if (OPT_STRCMP ("CC_OPT_RESTORE"))
65    {
66      extern int initial_optimize_flag;
67
68      if (optimize != initial_optimize_flag)
69        {
70          if (initial_optimize_flag)
71            obey_regdecls = 0;
72          else
73            obey_regdecls = 1;
74          optimize = initial_optimize_flag;
75        }
76      warning ("optimization level restored");
77    }
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;
84}
Note: See TracBrowser for help on using the repository browser.