This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: linux says it is a bug
- From: Yury Gribov <y dot gribov at samsung dot com>
- To: Paul_Koning at Dell dot com, rth at redhat dot com
- Cc: richard dot guenther at gmail dot com, jwakely dot gcc at gmail dot com, hannes at stressinduktion dot org, manjian2006 at gmail dot com, gcc at gcc dot gnu dot org
- Date: Wed, 05 Mar 2014 10:12:53 +0400
- Subject: Re: linux says it is a bug
- Authentication-results: sourceware.org; auth=none
- References: <20140304064026 dot GE8019 at ubuntu> <CAFiYyc3bVGgG=dmozPG5m4Vx_oJbR=rR=TsZfj+01dvXmWiJmw at mail dot gmail dot com> <20140304091703 dot GE17043 at order dot stressinduktion dot org> <CAH6eHdQ2mrDYm5s2FiGWdQnp7V_cV0JdwGA381SXzp3D79j+=Q at mail dot gmail dot com> <CAFiYyc2M9yXdVgA3wxoaXMTmaKOf7DjwHmour3THSEX1u6oBjA at mail dot gmail dot com> <531629D3 dot 1040402 at redhat dot com> <C75A84166056C94F84D238A44AF9F6AD06F09D3B at AUSX10MPC102 dot AMER dot DELL dot COM>
>> Asms without outputs are automatically volatile. So there ought be
zero change
>> with and without the explicit use of the __volatile__ keyword.
>
> That’s what the documentation says but it wasn’t actually true
> as of a couple of releases ago, as I recall.
Looks like 2005:
$ git annotate gcc/c/c-typeck.c
...
89552023 ( bonzini 2005-10-05 12:17:16 +0000 9073)
/* asm statements without outputs, including simple ones, are treated
89552023 ( bonzini 2005-10-05 12:17:16 +0000 9074)
as volatile. */
89552023 ( bonzini 2005-10-05 12:17:16 +0000 9075)
ASM_INPUT_P (args) = simple;
89552023 ( bonzini 2005-10-05 12:17:16 +0000 9076)
ASM_VOLATILE_P (args) = (noutputs == 0);
-Y