[PATCH] D39611: [CodeGen] change const-ness of complex calls
Sanjay Patel via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 7 12:05:46 PST 2017
spatel updated this revision to Diff 121949.
spatel retitled this revision from "[CodeGen] make cbrt and fma constant (never set errno); document complex calls as always constant" to "[CodeGen] change const-ness of complex calls".
spatel edited the summary of this revision.
spatel added a comment.
I don't know if we have agreement on the behavior that we want yet, but I'm updating the patch/description/title to only deal with <complex> in this patch and taking a shot at one interpretation, so we can see what that might look like.
There are really 2 changes here:
1. We had all of <complex> marked constant all the time ('c'). I think there's agreement that can't be true by default (a platform could set errno on any of these calls based on the language in the C standard).
2. We make an exception for a GNU environment - here, the calls are always constant because the standard allows - and POSIX constrains - the errno setting behavior. This is despite the fact that glibc is known to set errno in some cases.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 48027 bytes
Desc: not available
More information about the cfe-commits