[llvm-commits] CVS: llvm/tools/gccld/gccld.cpp

Chris Lattner lattner at cs.uiuc.edu
Sat Nov 29 13:46:01 PST 2003


Changes in directory llvm/tools/gccld:

gccld.cpp updated: 1.66 -> 1.67

---
Log message:

Fix compatibility with gcc 3.4


---
Diffs of the changes:  (+3 -5)

Index: llvm/tools/gccld/gccld.cpp
diff -u llvm/tools/gccld/gccld.cpp:1.66 llvm/tools/gccld/gccld.cpp:1.67
--- llvm/tools/gccld/gccld.cpp:1.66	Sun Nov 23 23:31:57 2003
+++ llvm/tools/gccld/gccld.cpp	Sat Nov 29 13:45:47 2003
@@ -129,9 +129,7 @@
   // Count the number of entries in the old list;
   unsigned entries;   // The number of entries in the old environment list
   for (entries = 0; envp[entries] != NULL; entries++)
-  {
-    ;
-  }
+    /*empty*/;
 
   // Add one more entry for the NULL pointer that ends the list.
   ++entries;
@@ -141,8 +139,8 @@
     return NULL;
 
   // Allocate a new environment list.
-  char **newenv;
-  if ((newenv = new (char *) [entries]) == NULL)
+  char **newenv = new char* [entries];
+  if ((newenv = new char* [entries]) == NULL)
     return NULL;
 
   // Make a copy of the list.  Don't forget the NULL that ends the list.





More information about the llvm-commits mailing list