Author: coke
Date: Tue Mar 25 13:28:51 2008
New Revision: 26545

Modified:
   trunk/src/dynext.c
   trunk/src/pmc/capture.pmc
   trunk/src/pmc/unmanagedstruct.pmc
   trunk/tools/build/c2str.pl

Log:
[icc]

RT #52028 ([PATCH] Do not split macro invocations that use CONST_STRING into 
multiple lines)

Matt Kraai++


Modified: trunk/src/dynext.c
==============================================================================
--- trunk/src/dynext.c  (original)
+++ trunk/src/dynext.c  Tue Mar 25 13:28:51 2008
@@ -459,13 +459,13 @@
 PMC *
 Parrot_clone_lib_into(ARGMOD(Interp *d), ARGMOD(Interp *s), ARGIN(PMC 
*lib_pmc))
 {
-    STRING * const wo_ext = clone_string_into(d, s, VTABLE_getprop(s, lib_pmc,
-        CONST_STRING(s, "_filename")));
-    STRING * const lib_name = clone_string_into(d, s, VTABLE_getprop(s, 
lib_pmc,
-        CONST_STRING(s, "_lib_name")));
+    STRING * const wo_ext = clone_string_into(d, s,
+        VTABLE_getprop(s, lib_pmc, CONST_STRING(s, "_filename")));
+    STRING * const lib_name = clone_string_into(d, s,
+        VTABLE_getprop(s, lib_pmc, CONST_STRING(s, "_lib_name")));
     void * const handle = PMC_data(lib_pmc);
-    STRING * const type = VTABLE_get_string(s,
-        VTABLE_getprop(s, lib_pmc, CONST_STRING(s, "_type")));
+    STRING * const type =
+        VTABLE_get_string(s, VTABLE_getprop(s, lib_pmc, CONST_STRING(s, 
"_type")));
 
     if (!string_equal(s, type, CONST_STRING(s, "Ops"))) {
         /* we can't clone oplibs in the normal way, since they're actually

Modified: trunk/src/pmc/capture.pmc
==============================================================================
--- trunk/src/pmc/capture.pmc   (original)
+++ trunk/src/pmc/capture.pmc   Tue Mar 25 13:28:51 2008
@@ -451,8 +451,8 @@
         if (PObj_is_object_TEST(SELF)) {
             STRING *classname = CONST_STRING(INTERP, "Capture");
             PMC    *classobj  = Parrot_oo_get_class_str(INTERP, classname);
-            capt              = VTABLE_get_attr_keyed(interp, SELF, classobj,
-                                    CONST_STRING(interp, "proxy"));
+            STRING *attribute = CONST_STRING(interp, "proxy");
+            capt              = VTABLE_get_attr_keyed(interp, SELF, classobj, 
attribute);
         }
 
         CAPTURE_array_CREATE(INTERP, capt);
@@ -469,8 +469,8 @@
         if (PObj_is_object_TEST(SELF)) {
             STRING *classname = CONST_STRING(INTERP, "Capture");
             PMC    *classobj  = Parrot_oo_get_class_str(INTERP, classname);
-            capt              = VTABLE_get_attr_keyed(interp, SELF, classobj,
-                                    CONST_STRING(interp, "proxy"));
+            STRING *attribute = CONST_STRING(interp, "proxy");
+            capt              = VTABLE_get_attr_keyed(interp, SELF, classobj, 
attribute);
         }
         CAPTURE_hash_CREATE(INTERP, capt);
         capt_hash = PARROT_CAPTURE(capt)->hash;

Modified: trunk/src/pmc/unmanagedstruct.pmc
==============================================================================
--- trunk/src/pmc/unmanagedstruct.pmc   (original)
+++ trunk/src/pmc/unmanagedstruct.pmc   Tue Mar 25 13:28:51 2008
@@ -389,8 +389,7 @@
 
             /* grab the struct from the metadata */
             if (ptr->pmc_ext && PMC_metadata(ptr)) {
-                ret = VTABLE_getprop(interp, ptr,
-                        CONST_STRING(interp, "_struct"));
+                ret = VTABLE_getprop(interp, ptr, CONST_STRING(interp, 
"_struct"));
             }
             else {
                 real_exception(interp, NULL, E_TypeError,

Modified: trunk/tools/build/c2str.pl
==============================================================================
--- trunk/tools/build/c2str.pl  (original)
+++ trunk/tools/build/c2str.pl  Tue Mar 25 13:28:51 2008
@@ -113,10 +113,11 @@
     print $ALL "# $infile\n";
     my %this_file_seen;
 
-    # NOTE: when CONST_STRING gets used in a .pmc it *should not* be split
-    # across more than one line, because some compilers generate line
-    # numbers in such cases differently to the way gcc does this (a case in
-    # point is Intel's C compiler, icc) and hence the #defined CONST_STRING
+    # NOTE: when CONST_STRING gets used it and any macro invocations
+    # that it is used in *should not* be split across more than one
+    # line, because some compilers generate line numbers in such cases
+    # differently from the way gcc does this (a case in point is
+    # Intel's C compiler, icc) and hence the #defined CONST_STRING
     # won't be found by the compiler.
 
     # There is a chance that the same __LINE__ will reoccur if #line directives

Reply via email to