|
|
Subscribe / Log in / New account

Re: [PATCH 40/79] link_path_walk: turn inner loop into explicit goto

Re: [PATCH 40/79] link_path_walk: turn inner loop into explicit goto

Posted May 15, 2015 18:01 UTC (Fri) by ms_43 (subscriber, #99293)
Parent article: Re: [PATCH 40/79] link_path_walk: turn inner loop into explicit goto

If Linux isn't programmed in Pascal, why does every function start with a list of declarations of all variables used in the function, even if the variables are only used in a nested scope?

The usual justification people give for doing that is that Visual Studio doesn't support C99, but that can't be the reason for Linux?


to post comments

Re: [PATCH 40/79] link_path_walk: turn inner loop into explicit goto

Posted May 15, 2015 19:27 UTC (Fri) by viro (subscriber, #7872) [Link]

a) variables with scope less than entire function body scope had been there since before C89, let alone C99. C99 availability anywhere has nothing whatsoever to do with that.
b) RTFS - they certainly are used in the kernel source quite a lot. Including the function in question, BTW.
c) bonus question: describe the changes introduced by C99 in that area of the language.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds