Commit Graph

5 Commits

Author SHA1 Message Date
Zack Weinberg 6d4587f735 cppinit.c (cpp_post_options): Shut off macro expansion if -fpreprocessed.
* cppinit.c (cpp_post_options): Shut off macro expansion if
	-fpreprocessed.
	* cpplib.c (_cpp_handle_directive): If -fpreprocessed, accept
	IN_I directives only if the # is in column 1 and the directive
	name begins in column 2.
	* cppmain.c (scan_buffer): Insert a space between # and an
	identifier, when that identifier is a directive name.

	* tradcpp.c (struct file_buf): Add a pointer to the next entry
	in the header search path.
	(enum node_type): Add T_INCLUDE_NEXT.
	(directive_table): Add entry for include_next.
	(do_include_next): New function.
	(process_include): New routine, broken out of do_include.
	(finclude): Insert 'nhd' argument, to be copied into
	next_header_dir of the new buffer.
	(main): Adjust to match.
	* gsyslimits.h, limity.h: Un-indent #include_next.

testsuite:
	* gcc.dg/cpp/direct2.c: New test.
	* gcc.dg/cpp/direct2s.c: New test.

	* gcc.c-torture/execute/920730-1t.c: #undef __GNUC__ at head.

From-SVN: r41932
2001-05-10 00:07:23 +00:00
Zack Weinberg bfab56e7ab cppinit.c (cpp_start_read): Turn off -Wtraditional if processing C++.
* cppinit.c (cpp_start_read): Turn off -Wtraditional if
	processing C++.
	* cpplib.c (_cpp_handle_directive): Improve warnings for
	traditional C and indented directives.

	* enquire.c, gsyslimits.h, limity.h, config/convex/fixinc.convex,
	fixinc/fixinc.irix, fixinc/fixinc.sco, fixinc/fixinc.wrap,
	fixinc/inclhack.def: Indent the # of #include_next one space.
	* cp/rtti.c: Un-indent #if and #endif.

	* cppexp.c (_cpp_parse_expr): If lex returns '#', it's a
	syntax error, but an error has already been printed.
	* cpplex.c (_cpp_parse_assertion): Give a more specific error
	message when called with nothing remaining on the line.
	(_cpp_lex_token): If _cpp_parse_assertion fails, return an
	OTHER token, not an ASSERTION.
	* cpplib.c (do_assert): When we create a 'base' node, clear
	its aschain pointer.

	* gcc.c-torture/compile/981211-1.c: Move to...
	* gcc.dg/cpp-as1.c: ...here.
	* gcc.dg/cpp-as2.c: New file.

	* gcc.dg/cpp-tradwarn1.c: Change warning regexps to match the
	compiler.

From-SVN: r32870
2000-04-02 22:50:55 +00:00
Ian Lance Taylor 66de8a65bf Handle recursive <limits.h>
From-SVN: r8690
1994-12-22 17:50:42 +00:00
Richard Stallman 30c08fcc6b Test and define _GCC_LIMITS_H_, not _LIMITS_H_.
From-SVN: r2822
1992-11-30 23:08:48 +00:00
Charles Hannum 0ceb0c11e3 entered into RCS
From-SVN: r1327
1992-06-28 15:34:25 +00:00