P
Peter Nilsson
[I think the intended example is really...
int8_t *ip = ...;
char *cp = ip;
]
True, but any implementation can issue a diagnostic for any construct
whether it violates a constraint or not.
True, but there is nothing in the standard that says a given
implementation
_cannot_ issue a diagnostic in a circumstance that would require one!
The code detects _careless_ non-conforming implementations. But that
goes for any strictly conforming code applied to any implementation
claiming conformance.
You say the code above requires a diagnostic... fine! My implementation
will issue a diagnostic. Now where's the conformance issue?
int8_t *ip = ...;
char *cp = ip;
]
... The point, I guess, is that the above code fragment violates a
constraint on any possible conforming implementation. If an
implementation chose to take advantage of the "as if" rule, as
Lawrence Kirby suggested, the lack of a diagnostic would demonstrate
that the implementation is non-conforming.
True, but any implementation can issue a diagnostic for any construct
whether it violates a constraint or not.
Agreed, *except* that you can detect the non-conformance by the lack
of a diagnostic.
True, but there is nothing in the standard that says a given
implementation
_cannot_ issue a diagnostic in a circumstance that would require one!
The code detects _careless_ non-conforming implementations. But that
goes for any strictly conforming code applied to any implementation
claiming conformance.
You say the code above requires a diagnostic... fine! My implementation
will issue a diagnostic. Now where's the conformance issue?