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]

Re: Move "X +- C1 CMP C2 to X CMP C2 -+ C1" to match.pd


On Wed, 27 Apr 2016, Richard Biener wrote:

--- trunk4/gcc/fold-const.h     (revision 235452)
+++ trunk4/gcc/fold-const.h     (working copy)
@@ -13,20 +13,22 @@ WARRANTY; without even the implied warra
 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 for more details.

 You should have received a copy of the GNU General Public License
 along with GCC; see the file COPYING3.  If not see
 <http://www.gnu.org/licenses/>.  */

 #ifndef GCC_FOLD_CONST_H
 #define GCC_FOLD_CONST_H

+#include <flag-types.h>
+

I think the canonical way is to include options.h where you include
fold-const.h ...
(ick)

Doesn't the prototype serve as a forward declaration only and thus including
options.h from gimple-match-head.c is enough?

Doesn't look like it. If I remove this include, I get build failures for
a large part of the C front-end (through c-family/c-common.h) and
tree-ssa-scopedtables.c. Including options.h in those 2 files seems to
work (I didn't check if all the files in config/ that include
fold-const.h also indirectly include options.h). If you really think
that's better, I'll do it...

--
Marc Glisse


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]