3 ms·
The compiler does this with other “library” functions like malloc and printf. There’s no reason a compiler couldn’t convert to a built in for this new type.
by slededit 8y ago
The compiler does this with other “library” functions like malloc and printf. There’s no reason a compiler couldn’t convert to a built in for this new type.
- WalterBright 8y agoC doesn't have member functions and doesn't do implicit conversions to/from struct types.
- slededit 8y agoThat’s obvious and also completely unrelated to what I was saying. The optimizer can convert a library type to a builtin type if it still behaves as specified in the standard.
- WalterBright 8y agoC isn't powerful enough to have the library type behave as desired (with implicit conversions, etc.).
- gpderetta 8y agoaye, if it is defined in the same standard, there is really no technical difference between a language feature and a library feature.