Lasse Kärkkäinen wrote on 15 October 2008 20:12:

> The problem here is that the C++ standard requires line 8 to be
> interpreted as a declaration of a function named str, returning string
> and taking two arguments of type isbi (the first one is named cin and
> the second one is anonymous). The extra parenthesis around variable
> names are ignored.
> 
> However, since it is not conventional to use parenthesis around variable
> names in function declarations, this problem could be analyzed by GCC,
> issuing a proper warning.

  Can anyone point me at an explanation of why this (parentheses around
variable names in prototypes) is even allowed?  I assume that the proximal
cause is "Because the standard says so", but does it actually buy us anything
in terms of what can be expressed that otherwise couldn't?

  Standards compliance and all that, but maybe in std=gnu++ mode we could make
it an error, or perhaps deprecated?


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....

Reply via email to