From: | Lei Zhang <zhanglei.april@×××××.com> |
---|---|
To: | Clang Dev <cfe-dev@××××××××××.org>, gentoo-musl@l.g.o |
Subject: | [gentoo-musl] Clang++ always defines _GNU_SOURCE |
Date: | Tue, 14 Jun 2016 08:40:57 |
Message-Id: | CAOYuCc1G+WmefZndykNXUsxARGBSVRroLZRm2QB2rVne3mN9qQ@mail.gmail.com |
1 | Hi, |
2 | |
3 | I noticed that clang++ unconditionally defines _GNU_SOURCE on Linux, |
4 | even when I'm not including any headers in my code. Switching from |
5 | stdlibc++ to libc++ doesn't change this, either. |
6 | |
7 | I understand that g++ does this because stdlibc++ heavily relies on |
8 | _GNU_SOURCE. But what is the reason for clang++ to do so when using |
9 | libc++? Does libc++ also rely on this macro to work on Linux? |
10 | |
11 | |
12 | Regards, |
13 | Lei |