Liste des Groupes | Revenir à cl c |
James Kuyper <jameskuyper@alumni.caltech.edu> writes:
>Tim Rentsch <tr.17687@z991.linuxsc.com> writes:>
>Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:>
>James Kuyper <jameskuyper@alumni.caltech.edu> writes:>
[...]
>It's main potential usefulness is not in the definition of the>
function, but in calls to the function. If the calls occur in
a different translation unit from the definition, the compiler
does not have the needed information.
It does if the visible declaration has the same information.
Like 'restrict', parameter array length information, specified by
way of 'static', is ignored outside of function definitions. As
was intended (with 'restrict' also).
? What "static" does when applied to an array parameter's length is to
render the behavior undefined if the function is called with a pointer
that points to an array that is shorter than the specified length. Are
you saying that it has no such effect except for inside the function
definition? I'm not sure what that would even mean - is the behavior
undefined only for recursive calls to the function?
What I mean is that such uses of 'static' have no effect when
used in declarations that are not part of a definition.
Les messages affichés proviennent d'usenet.