Closed Quuxplusone closed 10 years ago
Bugzilla Link | PR12770 |
Status | RESOLVED FIXED |
Importance | P enhancement |
Reported by | Dmitri Shubin (sbn@tbricks.com) |
Reported on | 2012-05-09 01:47:07 -0700 |
Last modified on | 2014-02-05 19:31:49 -0800 |
Version | 3.0 |
Hardware | Macintosh MacOS X |
CC | basv@odd-e.com, dgregor@apple.com, efriedma@quicinc.com, gribozavr@gmail.com, joakim@tbricks.com, llvm-bugs@lists.llvm.org, rafael@espindo.la, richard-llvm@metafoo.co.uk |
Fixed by commit(s) | |
Attachments | |
Blocks | |
Blocked by | |
See also |
This currently breaks build on Solaris 10 with TOT of clang: the following 2
lines are rejected:
$ cat -n a.cpp
1 #include <unistd.h>
2 #include <stdio.h>
$ ./build-clang/Release/bin/clang++ -c a.cpp
In file included from a.cpp:2:
/usr/include/stdio.h:85:12: error: target of using declaration conflicts with
declaration already in scope
using std::rename;
^
/usr/include/iso/stdio_iso.h:190:12: note: target of using declaration
extern int rename(const char *, const char *);
^
/usr/include/unistd.h:449:12: note: conflicting declaration
extern int rename(const char *, const char *);
^
1 error generated.
$ ./build-clang/Release/bin/clang++ -v
clang version 3.2 (trunk 156374)
Target: i386-pc-solaris2.10
Thread model: posix
This started to happen after default value of __cpusplus macro was changed from
1 to std conforming 199711L
_Bug 14619 has been marked as a duplicate of this bug._
We don't consider the case where a using shadow declaration declares the same
entity that we're declaring. Another rejects-valid:
namespace A { void f(); }
namespace B { using A::f; }
namespace A { using B::f; void f(); }
Fixed in r200897.