[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnet/cscc/c c_grammar.y,1.58,1.59
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnet/cscc/c c_grammar.y,1.58,1.59 |
Date: |
Wed, 02 Jul 2003 20:31:58 -0400 |
Update of /cvsroot/dotgnu-pnet/pnet/cscc/c
In directory subversions:/tmp/cvs-serv9346/cscc/c
Modified Files:
c_grammar.y
Log Message:
Make the C compiler more robust against failures of "CTypeDefineStructOrUnion".
Index: c_grammar.y
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/c/c_grammar.y,v
retrieving revision 1.58
retrieving revision 1.59
diff -C2 -r1.58 -r1.59
*** c_grammar.y 1 Jul 2003 11:47:14 -0000 1.58
--- c_grammar.y 3 Jul 2003 00:31:56 -0000 1.59
***************
*** 1773,1776 ****
--- 1773,1790 ----
$<structInfo>$.type =
CTypeDefineStructOrUnion
(&CCCodeGen, $2, $1,
functionName);
+ if(!($<structInfo>$.type))
+ {
+ /* This shouldn't happen, but
fail gracefully */
+ if($1 == C_STKIND_STRUCT)
+ {
+ CCError(_("`struct %s'
is already defined"), $2);
+ }
+ else
+ {
+ CCError(_("`union %s'
is already defined"), $2);
+ }
+ $<structInfo>$.type =
CTypeDefineAnonStructOrUnion
+ (&CCCodeGen,
currentStruct, functionName, $1);
+ }
}
else
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnet/cscc/c c_grammar.y,1.58,1.59,
Rhys Weatherley <address@hidden> <=