This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 3/N] Fix GCC internal format in D front-end.


On 3/11/19 2:38 PM, Jakub Jelinek wrote:
> I think for D you need to go through Iain Buclaw, I have no idea if
> exp->error even has the gcc internal format infrastructure.  Can you split
> that part of the patch and post it independently?

The patch addresses that.

Martin

>From 2285a99c9ca1435346eac9dbc0ffd41d29b8eaec Mon Sep 17 00:00:00 2001
From: marxin <mliska@suse.cz>
Date: Mon, 11 Mar 2019 14:59:25 +0100
Subject: [PATCH] Fix GCC internal format in D front-end.

gcc/d/ChangeLog:

2019-03-11  Martin Liska  <mliska@suse.cz>

	* dmd/expressionsem.c: Fix GCC internal format.
---
 gcc/d/dmd/expressionsem.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/gcc/d/dmd/expressionsem.c b/gcc/d/dmd/expressionsem.c
index bcc1ac9ed2f..cf09f097476 100644
--- a/gcc/d/dmd/expressionsem.c
+++ b/gcc/d/dmd/expressionsem.c
@@ -1366,7 +1366,7 @@ public:
         }
         else
         {
-            exp->error("new can only create structs, dynamic arrays or class objects, not %s's", exp->type->toChars());
+            exp->error("new can only create structs, dynamic arrays or class objects, not %s%'s", exp->type->toChars());
             return setError();
         }
 
@@ -2298,7 +2298,7 @@ public:
         const char *name = (char *)se->string;
         if (!global.params.fileImppath)
         {
-            e->error("need -Jpath switch to import text file %s", name);
+            e->error("need %<-Jpath%> switch to import text file %s", name);
             return setError();
         }
 
@@ -2310,7 +2310,7 @@ public:
         name = FileName::safeSearchPath(global.filePath, name);
         if (!name)
         {
-            e->error("file %s cannot be found or not in a path specified with -J", se->toChars());
+            e->error("file %s cannot be found or not in a path specified with %<-J%>", se->toChars());
             return setError();
         }
 
@@ -6444,7 +6444,7 @@ public:
                 e = scaleFactor(exp, sc);
             else
             {
-                exp->error("can't subtract %s from pointer", t2->toChars());
+                exp->error("can%'t subtract %s from pointer", t2->toChars());
                 e = new ErrorExp();
             }
             result = e;
@@ -6453,7 +6453,7 @@ public:
         if (t2->ty == Tpointer)
         {
             exp->type = exp->e2->type;
-            exp->error("can't subtract pointer from %s", exp->e1->type->toChars());
+            exp->error("can%'t subtract pointer from %s", exp->e1->type->toChars());
             return setError();
         }
 
@@ -8702,6 +8702,6 @@ Expression *semanticY(DotTemplateInstanceExp *exp, Scope *sc, int flag)
         return e;
     }
 Lerr:
-    e->error("%s isn't a template", e->toChars());
+    e->error("%s isn%'t a template", e->toChars());
     return new ErrorExp();
 }
-- 
2.21.0


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]