diff options
author | obrien <obrien@FreeBSD.org> | 1999-08-26 09:30:50 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 1999-08-26 09:30:50 +0000 |
commit | 0bedf4fb30066e5e1d4342a1d3914dae7d37cba7 (patch) | |
tree | 68d8110b41afd0ebbf39167b1a4918eea667a7c5 /contrib/gcc/c-pragma.c | |
parent | d4db5fb866b7ad5216abd5047774a3973b9901a9 (diff) | |
download | FreeBSD-src-0bedf4fb30066e5e1d4342a1d3914dae7d37cba7.zip FreeBSD-src-0bedf4fb30066e5e1d4342a1d3914dae7d37cba7.tar.gz |
Virgin import of gcc from EGCS 1.1.2
Diffstat (limited to 'contrib/gcc/c-pragma.c')
-rw-r--r-- | contrib/gcc/c-pragma.c | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/contrib/gcc/c-pragma.c b/contrib/gcc/c-pragma.c index 480cfca..3d01925 100644 --- a/contrib/gcc/c-pragma.c +++ b/contrib/gcc/c-pragma.c @@ -1,5 +1,5 @@ /* Handle #pragma, system V.4 style. Supports #pragma weak and #pragma pack. - Copyright (C) 1992 Free Software Foundation, Inc. + Copyright (C) 1992, 1997 Free Software Foundation, Inc. This file is part of GNU CC. @@ -18,18 +18,22 @@ along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <stdio.h> #include "config.h" +#include "system.h" +#include "rtl.h" #include "tree.h" +#include "except.h" #include "function.h" #include "defaults.h" #include "c-pragma.h" +#include "flags.h" +#include "toplev.h" #ifdef HANDLE_SYSV_PRAGMA /* When structure field packing is in effect, this variable is the number of bits to use as the maximum alignment. When packing is not - in effect, this is zero. */ + in effect, this is zero. */ extern int maximum_field_alignment; @@ -64,7 +68,7 @@ handle_pragma_token (string, token) if (HANDLE_PRAGMA_WEAK) handle_pragma_weak (state, name, value); -#endif /* HANDLE_PRAMA_WEAK */ +#endif /* HANDLE_PRAGMA_WEAK */ } type = state = ps_start; @@ -81,7 +85,16 @@ handle_pragma_token (string, token) else if (strcmp (IDENTIFIER_POINTER (token), "weak") == 0) type = state = ps_weak; else - type = state = ps_done; + { + type = state = ps_done; + + /* Issue a warning message if we have been asked to do so. + Ignoring unknown pragmas in system header file unless + an explcit -Wunknown-pragmas has been given. */ + if (warn_unknown_pragmas > 1 + || (warn_unknown_pragmas && ! in_system_header)) + warning ("ignoring pragma: %s", string); + } } else type = state = ps_done; |