undefined does not mean that it can't work, just that it is not guaranteed to work. As far as the runtime is concerned, if you mark a buffer as read_only, and then use that same buffer on two devices and write to it on one of the devices, it won't synchronize the buffer on the other device. So, your results are now undefined.
This makes sense, thank you.
Don't you think it would be smart to have writing to read_only and vice versa produce an error of some sort? It's better to receive an error than to hunt a potentially very subtle bug at runtime ("Why doesn't this get synchronized?" or even "Why am I getting random results?").
Granted it's neither required by the specs nor actually possible with the current error codes (CL_INVALID_KERNEL_ARGS comes to mind but its occurrence is strictly defined "if the kernel argument values have not been specified" while here they are specified only wrong). It would be handy though, like const correctness in normal code it could spare some gray hairs.