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]

[gcc-in-cxx] FYI: add missing cast


I'm checking this in on the gcc-in-cxx branch.

This adds a cast to silence errors about converting from an int type
to a tree_code.

Ordinarily I would bundle this into a larger change, but seeing as
this one line accounted for a large number of errors, I figured it
would be ok to commit it separately.

Tom

ChangeLog:
2008-09-19  Tom Tromey  <tromey@redhat.com>

	* gimple.h (gimple_cond_code): Cast result to tree_code.

Index: gimple.h
===================================================================
--- gimple.h	(revision 140371)
+++ gimple.h	(working copy)
@@ -2246,7 +2246,7 @@
 gimple_cond_code (const_gimple gs)
 {
   GIMPLE_CHECK (gs, GIMPLE_COND);
-  return gs->gsbase.subcode;
+  return (enum tree_code) gs->gsbase.subcode;
 }
 
 


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