Bug 44520
Summary: | What is the value of FE_ALL_EXCEPT? | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Trevin Beattie <trevin> |
Component: | libc | Assignee: | Jakub Jelinek <jakub> |
Status: | CLOSED NOTABUG | QA Contact: | |
Severity: | low | Docs Contact: | |
Priority: | low | ||
Version: | 7.1 | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2001-06-13 23:28:16 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Trevin Beattie
2001-06-13 23:28:12 UTC
This is pretty grey area in the standard, but according to Ulrich Drepper glibc is fine. The thing is what does for use in preprocessor macros mean. I'm not sure what you're referring to with "for use in preprocessor macros", but this whole report is a question of whether the FE_xxx macros should be suitable for such use. <bits/fenv.h> declares the FE_xxx macros in terms of enumeration constants, which are allowed in integer constant expressions (draft standard section 6.6), except when used in preprocessor macros (section 6.10.1). In the introduction to the standard library functions, section 7.1.4 of the draft C standard states "Each of the following statements applies unless explicitly stated otherwise in the detailed descriptions that follow:" ... "All object-like macros listed as expanding to integer constant expressions shall additionally be suitable for use in #if preprocessing directives." (where "object-like macro" is defined to mean a macro that doesn't take any arguments, as opposed to a "function-like macro".) As far as I can tell, that rule applies to the FE_xxx macros defined in section 7.6. The thing is whether suitability for use in #if preprocessing directives is satisfied if it is usable in defined() or if it must be used in other #if expressions too. I'd suggest you submit a clarify request for ISO C99 if you're looking for a definitive answer. To whom would I submit such a request? I tried contacting ansionline two weeks ago, but they never responded. Ask Ulrich Drepper <drepper>. He knows whom to contact I believe. I've started up a discussion on comp.std.c that had gotten rather involved, but the final (though perhaps not official) word is this: In article <3B7A5360.C0C19C67>, "James Russell Kuyper Jr." <kuyper> writes: "My personal opinion is that "suitable for use in #if preprocessing directive" does NOT mean only that defined() can be applied to the macro name. Such a requirement would be redundant with the specification that they are macros. Assuming that it's not intended to be redundant (always a tricky assumption when dealing with the standard), it seems to me that the only plausible intent is that the macros should expand to their actual numerical values in the context of a #if constant-expression. However, that's not something the standard says explicitly. Perhaps it should?" Nick Maclaren was a lot more obscure, but in essence he wrote: "I agree with you." |