Commit ad1b99fa authored by ghazi's avatar ghazi
Browse files

* c-parse.in (cast_expr): Avoid -Wstrict-prototype warnings for

	unprototyped function pointer casts on integer constants.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35638 138bc75d-0d04-0410-961f-82ee72b054a4
parent 51e23af4
2000-08-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* c-parse.in (cast_expr): Avoid -Wstrict-prototype warnings for
unprototyped function pointer casts on integer constants.
2000-08-11 Laurynas Biveinis <lauras@softhome.net>
* fixproto: Recognize DOS paths with drive letters as absolute paths.
......
......@@ -518,7 +518,14 @@ alignof:
cast_expr:
unary_expr
| '(' typename ')' cast_expr %prec UNARY
{ tree type = groktypename ($2);
{ tree type;
int SAVED_warn_strict_prototypes = warn_strict_prototypes;
/* This avoids warnings about unprototyped casts on
integers. E.g. "#define SIG_DFL (void(*)())0". */
if (TREE_CODE ($4) == INTEGER_CST)
warn_strict_prototypes = 0;
type = groktypename ($2);
warn_strict_prototypes = SAVED_warn_strict_prototypes;
$$ = build_c_cast (type, $4); }
| '(' typename ')' '{'
{ start_init (NULL_TREE, NULL, 0);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment