aboutsummaryrefslogtreecommitdiffhomepage
path: root/io.c
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2025-12-15 22:48:41 +0100
committerlemon <lsof@mailbox.org>2025-12-15 22:48:41 +0100
commit0ab0918bc128b11a0e22cd0d69189280a9d103fd (patch)
treeae33a66f2a723cfbb5e16319ba1318313d3e194d /io.c
parent302e24671942051d70707586cf8c605a5815edac (diff)
c: improve some type error diagnostics
Diffstat (limited to 'io.c')
-rw-r--r--io.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/io.c b/io.c
index 8d9af5c..e3af76b 100644
--- a/io.c
+++ b/io.c
@@ -213,7 +213,8 @@ pritypebefore(struct wbuf *buf, union type ty, int qual)
case TYPTR:
chld = typechild(ty);
n = pritypebefore(buf, chld, ty.flag & TFCHLDQUAL);
- n += bputc(buf, ' ');
+ if (!isptrcvtt(chld.t))
+ n += bputc(buf, ' ');
if (chld.t == TYARRAY || chld.t == TYFUNC)
n += bputc(buf, '(');
n += bputc(buf, '*');