summaryrefslogtreecommitdiff
path: root/usr.bin/pcc/cc
diff options
context:
space:
mode:
authorAnders Magnusson <ragge@cvs.openbsd.org>2007-10-06 14:34:46 +0000
committerAnders Magnusson <ragge@cvs.openbsd.org>2007-10-06 14:34:46 +0000
commit64f889a7ce6440251fb317f81c0201d410664c48 (patch)
tree168aa478296fc0f9fb18df264e406d758fb810f0 /usr.bin/pcc/cc
parent37ec583edfcf11324fcc3213f33a640a0be96338 (diff)
From master repo:
> Compalin if user is applying sizeof to bitfield, from Stefan Kempf.
Diffstat (limited to 'usr.bin/pcc/cc')
-rw-r--r--usr.bin/pcc/cc/ccom/trees.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/pcc/cc/ccom/trees.c b/usr.bin/pcc/cc/ccom/trees.c
index 78ecfb0b754..88fd39b4a21 100644
--- a/usr.bin/pcc/cc/ccom/trees.c
+++ b/usr.bin/pcc/cc/ccom/trees.c
@@ -1,4 +1,4 @@
-/* $Id: trees.c,v 1.5 2007/10/04 19:31:40 otto Exp $ */
+/* $Id: trees.c,v 1.6 2007/10/06 14:34:45 ragge Exp $ */
/*
* Copyright (c) 2003 Anders Magnusson (ragge@ludd.luth.se).
* All rights reserved.
@@ -1611,6 +1611,9 @@ doszof(NODE *p)
TWORD ty;
NODE *rv;
+ if (p->n_op == FLD)
+ uerror("can't apply sizeof to bit-field");
+
/*
* Arrays may be dynamic, may need to make computations.
*/