c-pragma.c: Don't elide entire file if !HANDLE_GENERIC_PRAGMAS.

* 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.

From-SVN: r36277
This commit is contained in:
Zack Weinberg 2000-09-08 22:17:24 +00:00 committed by Zack Weinberg
parent 385c92176c
commit ae54392bb9
4 changed files with 17 additions and 26 deletions

View File

@ -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

View File

@ -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"))

View File

@ -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 */

View File

@ -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