aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog11
-rw-r--r--gcc/c-lex.c4
-rw-r--r--gcc/c-pragma.c10
-rw-r--r--gcc/c-pragma.h18
4 files changed, 17 insertions, 26 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index bfdf06d..d2f6b61 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,14 @@
+2000-09-08 Zack Weinberg <zack@wolery.cumb.org>
+
+ * c-pragma.c: Don't elide entire file if !HANDLE_GENERIC_PRAGMAS.
+ (init_pragma): Avoid warning if pfile happens to be unused.
+ * c-pragma.h: Never define HANDLE_GENERIC_PRAGMAS. Never
+ define init_pragma to nothing. Always prototype
+ init_pragma. Prototype dispatch_pragma if !USE_CPPLIB.
+
+ * c-lex.c (process_directive): Always call dispatch_pragma.
+ Initialize entering_c_header to 0.
+
2000-09-08 Stephane Carrez <Stephane.Carrez@worldnet.fr>
* config/m68hc11/m68hc11.md: New file, machine description for
diff --git a/gcc/c-lex.c b/gcc/c-lex.c
index e522144..fa5c7a7 100644
--- a/gcc/c-lex.c
+++ b/gcc/c-lex.c
@@ -438,7 +438,7 @@ process_directive ()
int action_number, l;
char *new_file;
#ifndef NO_IMPLICIT_EXTERN_C
- int entering_c_header;
+ int entering_c_header = 0;
#endif
/* Don't read beyond this line. */
@@ -457,9 +457,7 @@ process_directive ()
if (!strcmp (name, "pragma"))
{
-#ifdef HANDLE_GENERIC_PRAGMAS
dispatch_pragma ();
-#endif
goto skipline;
}
else if (!strcmp (name, "define"))
diff --git a/gcc/c-pragma.c b/gcc/c-pragma.c
index 820720d..5b8f449 100644
--- a/gcc/c-pragma.c
+++ b/gcc/c-pragma.c
@@ -32,8 +32,6 @@ Boston, MA 02111-1307, USA. */
#include "c-lex.h"
#include "tm_p.h"
-#ifdef HANDLE_GENERIC_PRAGMAS
-
#if USE_CPPLIB
extern cpp_reader parse_in;
#else
@@ -438,10 +436,11 @@ dispatch_pragma ()
void
init_pragma ()
{
+ cpp_reader *pfile ATTRIBUTE_UNUSED;
#if !USE_CPPLIB
- cpp_reader *pfile = 0;
+ pfile = 0;
#else
- cpp_reader *pfile = &parse_in;
+ pfile = &parse_in;
#endif
#ifdef HANDLE_PRAGMA_PACK
@@ -450,7 +449,6 @@ init_pragma ()
#ifdef HANDLE_PRAGMA_WEAK
cpp_register_pragma (pfile, 0, "weak", handle_pragma_weak);
#endif
-
#ifdef REGISTER_TARGET_PRAGMAS
REGISTER_TARGET_PRAGMAS (pfile);
#endif
@@ -460,5 +458,3 @@ init_pragma ()
mark_align_stack);
#endif
}
-
-#endif /* HANDLE_GENERIC_PRAGMAS */
diff --git a/gcc/c-pragma.h b/gcc/c-pragma.h
index d669d9d..314273b 100644
--- a/gcc/c-pragma.h
+++ b/gcc/c-pragma.h
@@ -57,25 +57,11 @@ extern struct weak_syms * weak_decls;
extern int add_weak PARAMS ((const char *, const char *));
#endif /* HANDLE_PRAGMA_WEAK */
-
-/* Define HANDLE_GENERIC_PRAGMAS if any kind of front-end pragma
- parsing is to be done. The code in GCC's generic C source files
- will only look for the definition of this constant. They will
- ignore definitions of HANDLE_PRAGMA_PACK and so on. */
-#if defined HANDLE_PRAGMA_PACK || defined HANDLE_PRAGMA_WEAK \
- || defined REGISTER_TARGET_PRAGMAS
-#define HANDLE_GENERIC_PRAGMAS
-#endif
-
-#ifdef HANDLE_GENERIC_PRAGMAS
extern void init_pragma PARAMS ((void));
-# if !USE_CPPLIB
+/* If cpplib is in use, it handles dispatch. */
+#if !USE_CPPLIB
extern void dispatch_pragma PARAMS ((void));
-# endif
-
-#else
-# define init_pragma()
#endif
/* Duplicate prototypes for the register_pragma stuff and the typedef for