------- Comment #2 from gdr at cs dot tamu dot edu  2006-01-17 04:01 -------
Subject: Re:  Request for warning for parser ambiguity of function declarations
and variable declarations with initializations

"pinskia at gcc dot gnu dot org" <[EMAIL PROTECTED]> writes:

| Maybe if more C++ books actually talked about this issue, there would not be
a
| problem (sorry I could not resists).

C++ books do take about it -- just check out the good ones.  This very
problem, if you check out writings from Bjarne or me (see, e.g.,
our proposal for "generalized initializer list" for discussions), is a
problem inherited from the C syntax which permits redundant
parenthesis in declarations, exacerbed by the functional notation.
Check out details from D&E. 

|  Also warning about very valid and defined
| code even if it is a common mistake that beginers make.  I would rather have
| people actually taught this rule than GCC warning about it.

this is somehow hard to diagnose, but I guess one could engineer the
front-end to remember redundant parens, but it would be rather low
priority for me.

-- Gaby


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25814

Reply via email to