2 ms·
As the compiler is free to reorganise the variable order, that means you're relying on Undefined Behaviour for it to compile and do what you want. That's not so
by shakna 2y ago
As the compiler is free to reorganise the variable order, that means you're relying on Undefined Behaviour for it to compile and do what you want. That's not something inherent to the way pointers work.
- James_K 2y agoIt is valid C program. Undefined behaviour occurs at runtime, but it is valid and should be compiled by a conformant C compiler.