[sldev] [VWR] OpenJPEG backtraces
Argent Stonecutter
secret.argent at gmail.com
Sat Sep 22 16:25:16 PDT 2007
On 22-Sep-2007, at 16:46, Nicholaz Beresford wrote:
> Well Captain, have a look at the ANSI standard. Over and out.
No compiler in the world implements ANSI C without extensions. A
compiler should emit a diagnostic when it encounters one, but that is
not the same thing as refusing to permit it.
In c89/c90 there is no way of portably defining an integer type that
can contain any pointer, since long long wasn't standardized until
c99. Therefore the only way to portably express aligning a pointer
was to do it without a cast, and c89/c90 compilers HAD to permit that
in practice. The c99 standard hasn't been out long enough to justify
writing code that's not portable to c89/c90, so the appropriate
behavior for a compiler is to emit a diagnostic, not forbid the
operation.
I suspect this is another of those "it's really a C++ compiler"
issues with Microsoft C.
On 22-Sep-2007, at 17:04, Adam Frisby wrote:
> That and doing arithmetic on pointers makes a hell of a lot of
> assumptions about the memory space and can lead to all sorts of fun
> debugging it later.
Not relevant in this case. The arithmetic operation needs to be
performed, the only issue is what the syntax of that operation should
be.
More information about the SLDev
mailing list