shithub: scc

Download patch

ref: 34661e518cba898aeef5ce3db074942411dbbe21
parent: d081eceaa65630875c08f6ce90ad904e4bb82be3
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Fri May 20 11:22:40 EDT 2016

[cc1] Use ansi syntax for complex function pointer expressions

For a function pointer generated from a ternary operator is better
to use the ANSI syntax, because otherwise we have
too many parenthesis

--- a/cc1/decl.c
+++ b/cc1/decl.c
@@ -290,7 +290,7 @@
 	type.prop = 0;
 
 	k_r = (yytoken == ')' || yytoken == IDEN);
-	(*(k_r ? krfun : ansifun))(&type, types, syms, &ntypes, &nsyms);
+	(k_r ? krfun : ansifun)(&type, types, syms, &ntypes, &nsyms);
 	expect(')');
 
 	type.n.elem = ntypes;