[LLVMbugs] [Bug 23750] New: preprocessor should warn on #include_next with a filename different from the including name
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Jun 3 18:42:22 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=23750
Bug ID: 23750
Summary: preprocessor should warn on #include_next with a
filename different from the including name
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: richard-llvm at metafoo.co.uk
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Suppose:
main.cpp:
#include "foo/bar.h"
foo/bar.h:
#pragma once // or an include guard
#include_next "bar.h"
baz/bar.h:
extern int n;
... and we compile main.cpp with -Ifoo -Ibaz:
main.cpp includes foo/bar.h
foo/bar.h includes *itself*
Note that baz/bar.h is never included, and confusion reigns.
We should issue a warning if a file issues a #include_once with a name that
would not have found that same file in the starting search directory for the
#include_next search (that is, if the includer used the wrong name for the
file).
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150604/56fb1a43/attachment.html>
More information about the llvm-bugs
mailing list