linux says it is a bug

lin zuojian manjian2006@gmail.com
Tue Mar 4 06:40:00 GMT 2014


Hi,
    in include/linux/compiler-gcc.h :
    
/* Optimization barrier */
/* The "volatile" is due to gcc bugs */
#define barrier() __asm__ __volatile__("": : :"memory")

The comment of Linux says this is a gcc bug.But will any sane compiler
disable optimization without "volatile" key word?

--
Regards
lin zuojian



More information about the Gcc mailing list