[PATCH v5 5/9] powerpc/mm/book3s64: Update tlb flush routines to take a page walk cache flush argument
linux at roeck-us.net
Wed May 19 23:37:44 AEST 2021
On 5/19/21 5:03 AM, Segher Boessenkool wrote:
> On Tue, May 18, 2021 at 07:45:14PM -0500, Segher Boessenkool wrote:
>> On Wed, May 19, 2021 at 10:26:22AM +1000, Michael Ellerman wrote:
>>> Guenter Roeck <linux at roeck-us.net> writes:
>>>> Ah, sorry. I wasn't aware that the following is valid C code
>>>> void f1()
>>>> return f2();
>>>> as long as f2() is void as well. Confusing, but we live and learn.
>>> It might be valid, but it's still bad IMHO.
>>> It's confusing to readers, and serves no useful purpose.
>> And it actually explicitly is undefined behaviour in C90 already
>> (126.96.36.199 in C90, 188.8.131.52 in C99 and later).
> ... but there is a GCC extension that allows this by default:
> For C only, warn about a 'return' statement with an expression in a
> function whose return type is 'void', unless the expression type is
> also 'void'. As a GNU extension, the latter case is accepted
> without a warning unless '-Wpedantic' is used.
"184.108.40.206 The return statement
A return statement with an expression shall not appear in a function whose return type
is void. A return statement without an expression shall only appear in a function
whose return type is void."
Sounds like invalid to me, not just undefined behavior.
More information about the Linuxppc-dev