On Wed, Feb 16, 2011 at 12:58 AM, Andi Hellmund <mail@xxxxxxxxxxxxxxxx> wrote: > On 02/16/2011 12:11 AM, kevin diggs wrote: > A possible way to verify the need of volatile would be to compile the code > at a high optimization level, e.g. -O3 and check the assembly code (-S > option) if the inline assembly was removed or NOT. Would this be portable check, guaranteeing that compilation on other machine with other gcc version will not do opposite ? And anyway, why not always putting it to volatile ? Once you started embedding asm code, I guess you had a good reason for it to appear in the output code... BR, Drasko