About const and C functions

bearophile bearophileHUGS at lycos.com
Tue Mar 1 14:33:43 PST 2011


Do you know why DMD doesn't give a compilation error here?


import core.stdc.stdio: sscanf;
immutable int value = 5;
void main() {
    sscanf("10".ptr, "%d".ptr, &value);
}

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list