Author: dgilmore
Date: 2012-08-23 00:42:02 -0400 (Thu, 23 Aug 2012)
New Revision: 4020

Modified:
   trunk/osprey/crayf90/fe90/cmd_line.c
   trunk/osprey/crayf90/fe90/sytb.m
   trunk/osprey/crayf90/sgi/Makefile.gbase
Log:
Fix Is_Target_XXbit duplicate CPP macro name warning.

A previous fix shouldn't have included config_targ.h in
cmd_line.c, which causes compiler warnings concerning
duplicate macro names.

For TARG_X8664 define function is_Target_ABI_n32, to
encapsilate type-of-target check, added new files
cwh_targ_info.cxx in sgi directory (where it is valid to
include config_targ.h).  Added header file cwh_targ_info.h,
which can be safely imported by files in the fe90 directory.

Took off FFE from FFE_Is_Target_XXbit bit macros since the
CPP collision no longer occurs.  Added a comment warning
about the issue at hand.


Modified: trunk/osprey/crayf90/fe90/cmd_line.c
===================================================================
--- trunk/osprey/crayf90/fe90/cmd_line.c        2012-08-21 15:28:05 UTC (rev 
4019)
+++ trunk/osprey/crayf90/fe90/cmd_line.c        2012-08-23 04:42:02 UTC (rev 
4020)
@@ -68,10 +68,8 @@
 # include "tokens.h"
 # include "sytb.h"
 # include "cmd_line.h"
-#ifdef KEY /* F2003 */
 # include "defs.h"
-# include "config_targ.h"
-#endif /* KEY F2003 */
+# include "../sgi/cwh_targ_info.h"
 
 /*****************************************************************\
 |* function prototypes of static functions declared in this file *|
@@ -6975,7 +6973,7 @@
 c_ptr_abi_trouble(int dt_attr_idx) {
 #if defined(TARG_X8664)
   /* No problem unless we're Intel -m32 and it's a derived type */
-  if (!(Target_ABI == ABI_n32 && AT_OBJ_CLASS(dt_attr_idx) == Derived_Type)) {
+  if (!(is_Target_ABI_n32() && AT_OBJ_CLASS(dt_attr_idx) == Derived_Type)) {
     return FALSE;
   }
   /* When C_PTR or C_FUNPTR has arrived from an intrinsic module, p_driver.c
@@ -6999,7 +6997,7 @@
 boolean
 is_x8664_n32() {
 #if defined(TARG_X8664)
-  return Target_ABI == ABI_n32;
+  return is_Target_ABI_n32();
 #else /* defined(TARG_X8664) */
   return FALSE;
 #endif /* defined(TARG_X8664) */

Modified: trunk/osprey/crayf90/fe90/sytb.m
===================================================================
--- trunk/osprey/crayf90/fe90/sytb.m    2012-08-21 15:28:05 UTC (rev 4019)
+++ trunk/osprey/crayf90/fe90/sytb.m    2012-08-23 04:42:02 UTC (rev 4020)
@@ -158,6 +158,10 @@
 
 # define SET_POINTER_SIZE      (cmd_line_flags.s_pointer8)
 /* OSP_456 */
+/* To avoid compiler warnings don't include "config_targ.h", which
+ * contains versions of Is_Target_32bit and Is_Target_64bit that are
+ * BE specific.
+ */
 # define Is_Target_32bit()      (cmd_line_flags.s_pointer8 == 0)
 # define Is_Target_64bit()      (cmd_line_flags.s_pointer8 == 1)
 

Modified: trunk/osprey/crayf90/sgi/Makefile.gbase
===================================================================
--- trunk/osprey/crayf90/sgi/Makefile.gbase     2012-08-21 15:28:05 UTC (rev 
4019)
+++ trunk/osprey/crayf90/sgi/Makefile.gbase     2012-08-23 04:42:02 UTC (rev 
4020)
@@ -171,6 +171,7 @@
        cwh_pdgcs.cxx  \
        cwh_preg.cxx   \
        cwh_types.cxx  \
+       cwh_targ_info.cxx \
        cwh_stab.cxx   \
        cwh_stmt.cxx   \
        cwh_stk.cxx    \


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Open64-devel mailing list
Open64-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open64-devel

Reply via email to