Date
2022-02-18.07:47:23
Message id
176

Content

Annex C lists C compatibility issues. One item not in the annex came up in a discussion in comp.std.c++.

Consider this C and C++ code:

    const int j = 0;
    char* p = (char*)j;

Rationale (10/99): Because j is not a constant expression in C, this code fragment has implementation-defined behavior in C. There is no incompatibility with C resulting from the fact that C++ defines this behavior.