diff dmd/idgen.c @ 658:50383e476c7e

Upgraded frontend to DMD 1.035
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Mon, 06 Oct 2008 16:22:11 +0200
parents a34078905d01
children 6aaa3d3c1183
line wrap: on
line diff
--- a/dmd/idgen.c	Mon Oct 06 14:37:00 2008 +0200
+++ b/dmd/idgen.c	Mon Oct 06 16:22:11 2008 +0200
@@ -1,6 +1,6 @@
 
 // Compiler implementation of the D programming language
-// Copyright (c) 1999-2006 by Digital Mars
+// Copyright (c) 1999-2008 by Digital Mars
 // All Rights Reserved
 // written by Walter Bright
 // http://www.digitalmars.com
@@ -22,8 +22,8 @@
 
 struct Msgtable
 {
-	char *ident;	// name to use in DMD source
-	char *name;	// name in D executable
+	const char *ident;	// name to use in DMD source
+	const char *name;	// name in D executable
 };
 
 Msgtable msgtable[] =
@@ -209,9 +209,9 @@
     { "aaRehash", "_aaRehash" },
 
     // For pragma's
+    { "GNU_asm" },
     { "lib" },
     { "msg" },
-    { "GNU_asm" },
 
     // LLVMDC pragma's
     { "intrinsic" },
@@ -225,7 +225,7 @@
     { "vaarg", "va_arg" },
     { "llvmdc" },
 
-    // For toHash/toString
+    // For special functions
     { "tohash", "toHash" },
     { "tostring", "toString" },
 
@@ -260,7 +260,7 @@
 	fprintf(fp, "{\n");
 
 	for (i = 0; i < sizeof(msgtable) / sizeof(msgtable[0]); i++)
-	{   char *id = msgtable[i].ident;
+	{   const char *id = msgtable[i].ident;
 
 	    fprintf(fp,"    static Identifier *%s;\n", id);
 	}
@@ -285,8 +285,8 @@
 	fprintf(fp, "#include \"lexer.h\"\n");
 
 	for (i = 0; i < sizeof(msgtable) / sizeof(msgtable[0]); i++)
-	{   char *id = msgtable[i].ident;
-	    char *p = msgtable[i].name;
+	{   const char *id = msgtable[i].ident;
+	    const char *p = msgtable[i].name;
 
 	    if (!p)
 		p = id;
@@ -297,8 +297,8 @@
 	fprintf(fp, "{\n");
 
 	for (i = 0; i < sizeof(msgtable) / sizeof(msgtable[0]); i++)
-	{   char *id = msgtable[i].ident;
-	    char *p = msgtable[i].name;
+	{   const char *id = msgtable[i].ident;
+	    const char *p = msgtable[i].name;
 
 	    if (!p)
 		p = id;