c-parse.in (cast_expr): Avoid -Wstrict-prototype warnings for unprototyped function pointer casts on...
* c-parse.in (cast_expr): Avoid -Wstrict-prototype warnings for unprototyped function pointer casts on integer constants. From-SVN: r35638
This commit is contained in:
parent
a8e2bb7666
commit
402d11e13f
2 changed files with 13 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
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);
|
||||
|
|
Loading…
Add table
Reference in a new issue