This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Hi Richard, On Sun, 31 Dec 2006, Richard Guenther wrote: > /* Convert -1 - A to ~A. */ > if (INTEGRAL_TYPE_P (type) > && integer_all_onesp (arg0)) > return fold_build1 (BIT_NOT_EXPR, type, arg1); Historically, the better fix and prevalent idiom in fold-const.c would be to use "fold_convert (type, arg1)" instead of "op1". There was a time when "op1" couldn't be guaranteed to be of type "type" (but things are improving), and the utility of stripping NON_LVALUE_EXPR and other junk nodes is becoming less significant with my plans to obsolete/deprecate that tree code (once the C front-end is actively maintained). So in the near future, the benefits of avoiding allocating a new tree node and leaking the old one, will probably outweigh traditional usage. What do you think? Roger --
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |