/*
** Splint - annotation-assisted static program checker
-** Copyright (C) 1994-2002 University of Virginia,
+** Copyright (C) 1994-2003 University of Virginia,
** Massachusetts Institute of Technology
**
** This program is free software; you can redistribute it and/or modify it
if (ctype_isBroken (clp))
{
- llbuglit ("ctype_baseArrayPtr: bogus ctype");
+ llcontbug (message ("ctype_baseArrayPtr: bogus ctype getting base of: %s", ctype_unparse (c)));
+ return ctype_unknown;
}
return clp;
{
ctype cbr = ctype_getConjA (*c);
- /*drl bee: si*/ if ((*pred) (cbr))
+ if ((*pred) (cbr))
{
if ((*pred) (ctype_getConjB (*c)))
{
if (ctype_isUA (c))
{
- cstring tname = usymtab_getTypeEntryName
- (usymtab_convertId (ctype_typeId (c)));
+ cstring tname = usymtab_getTypeEntryName (usymtab_convertTypeId (ctype_typeId (c)));
if (cstring_equal (tname, context_getBoolName ()))
{
bool ctype_isVisiblySharable (ctype t)
{
- if (ctype_isUnknown (t)) return TRUE;
+ if (ctype_isUnknown (t))
+ {
+ return TRUE;
+ }
if (ctype_isConj (t))
{
if (rt == t)
{
- return TRUE;
+ if (ctype_isNumAbstract (t))
+ {
+ return FALSE;
+ }
+ else
+ {
+ return TRUE;
+ }
}
else
{
ctype ctype_biggerType (ctype c1, ctype c2)
{
- if (ctbase_isBigger (ctype_getCtbaseSafe (c2), ctype_getCtbaseSafe (c1)) )
+ if (ctbase_isBigger (ctype_getCtbaseSafe (c2), ctype_getCtbaseSafe (c1)))
{
return c2;
}
return c1;
}
}
+
+int ctype_getSize (ctype c)
+{
+ return ctbase_getSize (ctype_getCtbaseSafe (ctype_realType (c)));
+}