Iain Buclaw avatar Iain Buclaw committed 37fe4c2

D2: fix compilation warnings from building druntime/phobos.

Comments (0)

Files changed (6)

                 op1 = ce.nextArg();
                 op2 = ce.nextArg();
                 type = TREE_TYPE(op1);
-                // kinda wrong... could be casting.. so need to check type too?
-                while (TREE_CODE(op1) == NOP_EXPR)
-                    op1 = TREE_OPERAND(op1, 0);
-
+
+                // could be casting... so need to check type too?
+                STRIP_TYPE_NOPS(op1);
                 if (TREE_CODE(op1) == ADDR_EXPR)
                 {
                     op1 = TREE_OPERAND(op1, 0);
                     op1 = fix_d_va_list_type(op1);
                 }
 
+                STRIP_NOPS(op2);
                 if (TREE_CODE(op2) == ADDR_EXPR)
                     op2 = TREE_OPERAND(op2, 0);
                 // assuming nobody tries to change the return type
                 TREE_CONSTANT(var_decl) = 1;
         }
 
-#ifdef TARGET_DLLIMPORT_DECL_ATTRIBUTES
+#if TARGET_DLLIMPORT_DECL_ATTRIBUTES
         // Have to test for import first
         if (isImportedSymbol())
         {
             TREE_CONSTANT(fndecl) = ftype->isConst();
 #endif
 
-#ifdef TARGET_DLLIMPORT_DECL_ATTRIBUTES
+#if TARGET_DLLIMPORT_DECL_ATTRIBUTES
             // Have to test for import first
             if (isImportedSymbol())
             {

d/druntime/core/sys/posix/sys/un.d

  */
 module core.sys.posix.sys.un;
 
-version( Posix ):
-
 public import core.sys.posix.sys.socket: sa_family_t;
 
 extern(C):

d/phobos2/etc/c/curl.d

 
 module etc.c.curl;
 
-pragma(lib, "curl");
+// pragma(lib, "curl");
 
 import core.stdc.time;
 import core.stdc.config;

d/phobos2/gcc/unwind_pe.d

       if (encoding == DW_EH_PE_omit)
         return 0;
 
-      switch (encoding & 0x07)
+      final switch (encoding & 0x07)
         {
         case DW_EH_PE_absptr:
           return (void *).sizeof;
         case DW_EH_PE_udata8:
           return 8;
         }
-      abort ();
+      assert(0);
     }
 }
 
       if (encoding == DW_EH_PE_omit)
         return cast(_Unwind_Ptr) 0;
 
-      switch (encoding & 0x70)
+      final switch (encoding & 0x70)
         {
         case DW_EH_PE_absptr:
         case DW_EH_PE_pcrel:
         case DW_EH_PE_funcrel:
           return _Unwind_GetRegionStart (context);
         }
-      abort ();
+      assert (0);
     }
 }
 

d/phobos2/std/format.d

                     {
                         // Structs are pass-by-reference in V4 ABI
                         s = tis.xtoString(va_arg!(void*)(argptr));
+                        goto Lputstr;
                     }
                     else
                     {
                 {
                     s = tis.xtoString(argptr);
                     argptr += (tis.tsize() + 3) & ~3;
+                    goto Lputstr;
                 }
-                goto Lputstr;
             }
 
             default:
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.