On Tue, Jan 29, 2013 at 5:41 PM, Nico Weber <[email protected]> wrote: > On Tue, Jan 29, 2013 at 5:39 PM, Richard Smith <[email protected]> wrote: >> On Tue, Jan 29, 2013 at 4:47 PM, Nico Weber <[email protected]> wrote: >>> On Tue, Jan 29, 2013 at 1:00 PM, Dmitri Gribenko <[email protected]> >>> wrote: >>>> On Tue, Jan 29, 2013 at 10:16 PM, Nico Weber <[email protected]> wrote: >>>>> a coworker asked me if clang documents how it handles right shifts of >>>>> signed numbers today. As far as I can tell there's no documentation >>>>> for this, but I found PR11272 about documenting implementation-defined >>>>> behavior. The bug suggests just linking to gcc's documentation as a >>>>> first step, which is what the attached patch does. This isn't quite >>>>> correct (for example, clang supports UCNs without any flags), but is >>>>> correct for most things. People can fill in more details over time. >>>> >>>> +clang generally matches `gcc's implementation-defined >>>> +behavior >>>> <http://gcc.gnu.org/onlinedocs/gcc-4.2.1/gcc/C-Implementation.html#C-Implementation>`. >>>> >>>> Maybe there's a different wording that does not promise too much? I >>>> can easily see users relying on this (or complaining about Clang's >>>> implementation-defined behavior being different from gcc's). >>> >>> "generally tries to match"? The "generally" sounded fairly >>> weasel-wordy to me already. >>> >>>> What might help is a list of implementation-defined behaviors with >>>> quotations from the standard, as a boilerplate for developers to fill >>>> in. (It is much easier to write documentation when you know what >>>> exactly you should describe.) >>> >>> I don't have a copy of the standard. >> >> Latest working draft in committee mailing: >> >> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3485.pdf >> >> Current working draft: >> >> https://github.com/cplusplus/draft > > How similar is this to the list of implementation-defined behavior in > the C standard?
Similar, not the same. C11 standard (minus cover sheet) is here: http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
