mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-28 11:50:52 +08:00
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
This commit is contained in:
parent
d0b8780d9f
commit
d8a12e8478
@ -1,3 +1,9 @@
|
||||
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
|
||||
|
6
gcc/testsuite/gcc.dg/cpp/pr43195.c
Normal file
6
gcc/testsuite/gcc.dg/cpp/pr43195.c
Normal file
@ -0,0 +1,6 @@
|
||||
/* PR preprocessor/43195 */
|
||||
/* { dg-do preprocess } */
|
||||
/* { dg-options "-H" } */
|
||||
/* { dg-message "pr43195\.h\n" "" { target *-*-* } 0 } */
|
||||
#include "pr43195.h"
|
||||
|
1
gcc/testsuite/gcc.dg/cpp/pr43195.h
Normal file
1
gcc/testsuite/gcc.dg/cpp/pr43195.h
Normal file
@ -0,0 +1 @@
|
||||
#pragma once
|
@ -1,3 +1,8 @@
|
||||
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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user