Liste des Groupes | Revenir à theory |
On 5/18/24 12:01, Fred. Zwarts wrote:*Compiles under c11 and c17 with no warnings or errors*
......On 2024-05-15 15:24:57 +0000, olcott said:...00 int H(ptr x, ptr x);Another issue seems to be that in the declaration of H:The standard requires that different entities designated by the same
int H(ptr x, ptr x);
both parameters have the same name.
(Olcott is famous for using the same name for different objects.)
identifier must either have different scopes or different namespaces.
(6.2.1p2). In a function declaration that is not part of a function
definition, the parameter names have all function prototype scope
(6.2.1p4) and belong to the ordinary identifier name space (6.2.3p1).
This is not labelled as a constraint or syntax error, but the standard
fails to say what should be done with code that doesn't follow this
rule, so the behavior is undefined "by omission of any explicit
definition of the behavior".
In a function definition, the parameter names have block scope and
belong to the ordinary identifier name space, and therefore must not
only avoid duplicating each other, but must also avoid duplicating any
identifier declared in the outermost block of the function.
Les messages affichés proviennent d'usenet.