C++ function declarations with an empty parameter list denote no parameters instead...
authorChristoph Mallon <christoph.mallon@gmx.de>
Mon, 27 Oct 2008 10:46:15 +0000 (10:46 +0000)
committerChristoph Mallon <christoph.mallon@gmx.de>
Mon, 27 Oct 2008 10:46:15 +0000 (10:46 +0000)
[r23221]

parser.c

index 27b0c51..09accea 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -4045,7 +4045,9 @@ static declaration_t *parse_parameters(function_type_t *type, declaration_t **la
        }
 
        if (token.type == ')') {
-               type->unspecified_parameters = 1;
+               /* ISO/IEC 14882:1998(E) §C.1.6:1 */
+               if (!(c_mode & _CXX))
+                       type->unspecified_parameters = 1;
                goto parameters_finished;
        }