Liste des Groupes | Revenir à cl c |
Tim Rentsch <tr.17687@z991.linuxsc.com> writes:Sure. If gcc had a warning enforcing such consistency, I would definitely use it.
[...]It isn't just that checking the condition cannot be done in general.[...]
To be reliable the parameter length information would need to be
part of the function's type. That has implications for type
compatibility and also for the types of pointers-to-function. And
it would mean that removing a 'static' array length specification on
a function definition would necessitate also changing the functions
declarations, plus any affected pointers-to-function. Not worth it,
even if in theory it were doable.
In my opinion, keeping a function's definition and declarations
consistent is absolutely worth it, even if the language might not
require it.
Les messages affichés proviennent d'usenet.