lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 25 Jul 2011 19:58:24 -0400
From:	Arnaud Lacombe <lacombar@...il.com>
To:	Steven Rostedt <rostedt@...dmis.org>, gcc-help@....gnu.org
Cc:	stufever@...il.com, linux-kernel@...r.kernel.org,
	Wang Shaoyan <wangshaoyan.pt@...bao.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Ingo Molnar <mingo@...hat.com>
Subject: Re: [PATCH] TRACING: Fix a copmile warning

Hi,

On Mon, Jul 25, 2011 at 7:50 PM, Arnaud Lacombe <lacombar@...il.com> wrote:
> Hi,
>
> [adding gcc-help@ to the Cc: list]
>
> On Mon, Jul 25, 2011 at 6:38 PM, Arnaud Lacombe <lacombar@...il.com> wrote:
>> Hi,
>>
>> On Mon, Jul 25, 2011 at 4:19 PM, Steven Rostedt <rostedt@...dmis.org> wrote:
>>> On Mon, 2011-07-25 at 15:43 -0400, Arnaud Lacombe wrote:
>>>
>>>> Actually, we have a special uninitialized_var(x) macro to handle such
>>>> false positive. From include/linux/compiler-gcc.h:
>>>>
>>>> /*
>>>>  * A trick to suppress uninitialized variable warning without generating any
>>>>  * code
>>>>  */
>>>> #define uninitialized_var(x) x = x
>>>
>>> I'm aware of that too, but I think that is inappropriate as well. As I
>>> said, some versions of gcc report it, others don't. Seems that gcc 4.6.0
>>> says this is an error where 4.5.1 does not (I just tried both).
>>>
> [...]
> In which case the warning is fully valid. I'm not sure what's the C
> standard guarantee in term of conditional test order.
I'd assume that the following apply:

6.5 Expressions

3 The grouping of operators and operands is indicated by the
syntax.72) Except as specified
   later (for the function-call (), &&, ||, ?:, and comma operators),
the order of evaluation
  of subexpressions and the order in which side effects take place are
both unspecified.


in which case gcc is free to do whatever it wants :(

 - Arnaud
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ