Liste des Groupes | Revenir à cl c |
David Brown <david.brown@hesbynett.no> writes:(I hope that the issue of "totally different types" is now cleared up and can be laid to rest.)On 30/11/2024 00:44, Keith Thompson wrote:
It is also possible that people who want such tools would simply write them themselves. I suspect that for most people, writing a script that would do this job for their own code would be quick and simple, while writing one that worked fully for all possible cases would be much more of an effort.A function definition - as typically written - is also a functionYes.
declaration. So presumably you mean non-defining declaration here.
Some people have a style where they write forward declarations of allYes, that was an oversight on my part.
functions defined in a C file near the top of the file. I am not a
fan of that myself - especially as over time, this redundant
information is rarely kept fully in sync with the rest of the code.
But it is definitely something you'll sometimes see in real-world C
code. (You could argue that the code is then not "well-written" C,
but that would be a very subjective opinion.)
If someone wanted to ensure that all static functions defined in a
translation unit are declared near the top, there could be a separate
tool to generate, or at least check, the declarations. I'm not aware of
any such tool, which suggests there probably isn't much demand for it.
Les messages affichés proviennent d'usenet.