gcc/libcpp
Ollie Wild ccfc4c91bb directives-only.c: New file.
libcpp/
	* directives-only.c: New file.
	* internal.h (struct _cpp_dir_only_callbacks): New.
	(_cpp_preprocess_dir_only): New function.
	* directives.c (_cpp_handle_directive): Check directives_only before
	disabling execution of indented directives.
	* files.c (_cpp_stack_file): Add directives_only check.
	* include/cpplib.h (struct cpp_options): Add directives_only.
	(cpp_init_special_builtins): New function.
	* init.c (cpp_init_special_builtins): New function.
	(cpp_init_builtins): Move builtin_array initialization to
	cpp_init_special_builtins.
	(post_options): Check directives_only before setting
	pfile->state.prevent_expansion = 1.
	* macro.c (_cpp_builtin_macro_text): Print an error if __COUNTER__
	is expanded inside a directive while -fdirectives-only is enabled.
	* Makefile.in (libcpp_a_OBJS): Add directives-only.o.
	(libcpp_a_SOURCES): Add directives-only.c.

	gcc/
	* c-ppoutput.c (print_lines_directives_only): New function.
	(scan_translation_unit_directives_only): New function.
	(preprocess_file): Add call to scan_translation_unit_directives_only.
	* c-opts.c (c_common_handle_option): Add OPT_fdirectives_only.
	(sanitize_cpp_opts): Add default flag_dump_macros setting for
	-fdirectives-only.  Add errors for -fdirectives-only conflict with
	-Wunused-macros and -traditional.
	(finish_options): Add builtin macro initialization for
	-fdirectives-only + -fpreprocessed.
	* c.opt (fdirectives-only): New.
	* doc/cppopts.texi (fdirectives-only): New.

	gcc/testsuite/
	* gcc.dg/cpp/counter-2.c: New test.
	* gcc.dg/cpp/counter-3.c: New test.
	* gcc.dg/cpp/dir-only-1.c: New test.
	* gcc.dg/cpp/dir-only-1.h: New file.
	* gcc.dg/cpp/dir-only-2.c: New test.
	* gcc.dg/cpp/dir-only-3.c: New test.
	* gcc.dg/cpp/dir-only-3a.h: New file.
	* gcc.dg/cpp/dir-only-3b.h: New file.
	* gcc.dg/cpp/dir-only-4.c: New test.
	* gcc.dg/cpp/dir-only-5.c: New test.
	* gcc.dg/cpp/dir-only-6.c: New test.

From-SVN: r127066
2007-07-30 18:29:20 +00:00
..
include directives-only.c: New file. 2007-07-30 18:29:20 +00:00
po be.po, [...]: Update. 2007-06-26 21:05:37 +01:00
aclocal.m4
ChangeLog directives-only.c: New file. 2007-07-30 18:29:20 +00:00
charset.c re PR preprocessor/30001 (out-of-bounds access when processing empty file) 2006-12-28 18:45:48 +00:00
config.in
configure depstand.m4 (ZW_CREATE_DEPDIR): Use mkinstalldirs to make directory. 2007-01-27 19:50:38 +00:00
configure.ac configure.in (skipdirs): Don't build target-libiberty for SPU. 2006-11-21 01:35:42 +00:00
directives-only.c directives-only.c: New file. 2007-07-30 18:29:20 +00:00
directives.c directives-only.c: New file. 2007-07-30 18:29:20 +00:00
errors.c
expr.c cpplib.h (CPP_N_WIDTH_MD, [...]): Add new constants. 2007-07-03 07:53:58 +02:00
files.c directives-only.c: New file. 2007-07-30 18:29:20 +00:00
identifiers.c
init.c directives-only.c: New file. 2007-07-30 18:29:20 +00:00
internal.h directives-only.c: New file. 2007-07-30 18:29:20 +00:00
lex.c re PR preprocessor/14331 (please add option to suppress warning message "no newline at end of file") 2007-05-31 02:06:48 +00:00
line-map.c
macro.c directives-only.c: New file. 2007-07-30 18:29:20 +00:00
makedepend.c
Makefile.in directives-only.c: New file. 2007-07-30 18:29:20 +00:00
makeucnid.c
mkdeps.c re PR preprocessor/30468 (-M not fully chops dirname) 2007-01-30 15:50:00 +00:00
pch.c Fixup whitespacing 2007-06-01 02:12:37 +00:00
symtab.c
system.h
traditional.c traditional.c (_cpp_scan_out_logical_line): Initialize fmacro.args... 2007-07-04 12:08:44 +02:00
ucnid.h
ucnid.tab