[PATCH 21.5] Fix g++ build of lwlib-Xaw.c
"Stephen J. Turnbull" <[email protected]> Sat, 10 Jan 2015 20:05:01 +0900
| Newsgroups | gmane.emacs.xemacs.patches |
|---|---|
| Message-ID | <[email protected]> |
APPROVE xemacs-beta deleted from addresses. Jerry James writes: > PATCH 21.5 > > On Tue, Jan 6, 2015 at 9:19 AM, Marcus <[email protected]> wrote: > > Jerry James <[email protected]> writes: > > > >> Does the compile succeed if you cast to long first, then to int? > > > > Indeed, it does. The secrets of "why" are part of the C++ standard, I > > reckon. I am not even getting a warning despite the fact that casting > > long to int is lossy. > > Stephen already explained the whys and wherefores, so I'll just paste > the patch in here for public consideration. Obviously I'm +1 on the patch in theory, and building works for my standard build with Apple clang (C++ *and* C) on Yosemite. Note that Clang complains that building C code with a C++ compiler is a "deprecated behavior". Has anybody heard about this? Are there changes in the offing that will make C code that is acceptable to a C++ compiler unusably restricted? Steve