re PR preprocessor/43195 (#pragma once and -H)

2010-04-09  Manuel López-Ibáñez <manu@gcc.gnu.org>

	PR cpp/43195
libcpp/
	* files.c (report_missing_guard): Test for #pragma once.
testsuite/
	* gcc.dg/cpp/pr43195.c: New.
	* gcc.dg/cpp/pr43195.h: New.

From-SVN: r158169
parent d0b8780d
2010-04-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR cpp/43195
* gcc.dg/cpp/pr43195.c: New.
* gcc.dg/cpp/pr43195.h: New.
2010-04-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR 42965
......
/* PR preprocessor/43195 */
/* { dg-do preprocess } */
/* { dg-options "-H" } */
/* { dg-message "pr43195\.h\n" "" { target *-*-* } 0 } */
#include "pr43195.h"
2010-04-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR cpp/43195
* files.c (report_missing_guard): Test for #pragma once.
2010-04-07 Simon Baldwin <simonb@google.com>
* directives.c (do_diagnostic): Add warning reason argument,
......
......@@ -1261,7 +1261,8 @@ report_missing_guard (void **slot, void *d)
_cpp_file *file = entry->u.file;
/* We don't want MI guard advice for the main file. */
if (file->cmacro == NULL && file->stack_count == 1 && !file->main_file)
if (!file->once_only && file->cmacro == NULL
&& file->stack_count == 1 && !file->main_file)
{
if (data->paths == NULL)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment