[LLVMbugs] [Bug 20960] Linker errors on std::getline when including only <string> and not <istream>

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Sep 16 14:42:31 PDT 2014


http://llvm.org/bugs/show_bug.cgi?id=20960

Marshall Clow (home) <mclow.lists at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from Marshall Clow (home) <mclow.lists at gmail.com> ---
Howard provided me with this reference:

17.6.2.2 [using.headers]/p3 A translation unit shall include a header only
outside of any external declaration or definition, and shall include the header
lexically before the first reference in that translation unit to any of the
entities declared in that header. No diagnostic is required.

This states that your example code is undefined behavior (with no diagnostic
required!) because you reference std::istream without #include <istream>.

-- 
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/20140916/683363ad/attachment.html>


More information about the llvm-bugs mailing list