Summary: | Name 'DOMAIN' is blocked when including math.h | ||
---|---|---|---|
Product: | gcc | Reporter: | henad221 |
Component: | c | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED INVALID | ||
Severity: | minor | CC: | jakub |
Priority: | P3 | ||
Version: | 4.8.5 | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: |
Description
henad221
2016-07-18 06:52:19 UTC
What do you expect? Just use a different variable name. First of all, note that math.h header comes from the C library, not GCC, so likely glibc in your case. And, please learn about Feature Test Macros that affect the namespace. DOMAIN is part of SVID support, is included in e.g. _DEFAULT_SOURCE or _GNU_SOURCE. So e.g. if you compile with -D_XOPEN_SOURCE=700 or various others, DOMAIN will not be visible. Thanks for quick reply. I didn't expect the name DOMAIN to be used by something when including math.h. Thanks to Jakub for an explanation of what is happening, next time I will try to dig more into these kinds of issues before posting it as a bug. |