git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1348
4a8a32a2-be11-0410-ad9d-
d568d2c75423
+2001-10-03 Bernhard Held <bernhard@bernhardheld.de>
+
+ * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
+
2001-10-01 Bernhard Held <bernhard@bernhardheld.de>
* src/SDCCglue.c: test, if win32api is available for MINGW
2001-10-01 Bernhard Held <bernhard@bernhardheld.de>
* src/SDCCglue.c: test, if win32api is available for MINGW
/*-----------------------------------------------------------------*/
/* printTypeChain - prints the type chain in human readable form */
/*-----------------------------------------------------------------*/
/*-----------------------------------------------------------------*/
/* printTypeChain - prints the type chain in human readable form */
/*-----------------------------------------------------------------*/
-void
-printTypeChain (sym_link * type, FILE * of)
+void
+printTypeChain (sym_link * start, FILE * of)
+ sym_link * type, * search;
+ /* print the chain as it is written in the source: */
+ /* start with the last entry */
+ for (type = start; type && type->next; type = type->next)
+ ;
while (type)
{
if (IS_DECL (type))
{
while (type)
{
if (IS_DECL (type))
{
- if (DCL_PTR_VOLATILE(type)) {
+ if (DCL_PTR_VOLATILE (type)) {
fprintf (of, "volatile ");
}
switch (DCL_TYPE (type))
{
case FUNCTION:
fprintf (of, "volatile ");
}
switch (DCL_TYPE (type))
{
case FUNCTION:
- fprintf (of, "function ");
+ fprintf (of, "function");
- fprintf (of, "generic * ");
if (DCL_PTR_CONST (type))
fprintf (of, "const ");
if (DCL_PTR_CONST (type))
fprintf (of, "const ");
+ fprintf (of, "generic *");
- fprintf (of, "code * ");
if (DCL_PTR_CONST (type))
fprintf (of, "const ");
if (DCL_PTR_CONST (type))
fprintf (of, "const ");
+ fprintf (of, "code *");
- fprintf (of, "far * ");
if (DCL_PTR_CONST (type))
fprintf (of, "const ");
if (DCL_PTR_CONST (type))
fprintf (of, "const ");
- fprintf (of, "eeprom * ");
if (DCL_PTR_CONST (type))
fprintf (of, "const ");
if (DCL_PTR_CONST (type))
fprintf (of, "const ");
+ fprintf (of, "eeprom * ");
- fprintf (of, "near * ");
if (DCL_PTR_CONST (type))
fprintf (of, "const ");
if (DCL_PTR_CONST (type))
fprintf (of, "const ");
+ fprintf (of, "near *");
- fprintf (of, "idata *");
if (DCL_PTR_CONST (type))
fprintf (of, "const ");
if (DCL_PTR_CONST (type))
fprintf (of, "const ");
+ fprintf (of, "idata *");
- fprintf (of, "pdata *");
if (DCL_PTR_CONST (type))
fprintf (of, "const ");
if (DCL_PTR_CONST (type))
fprintf (of, "const ");
+ fprintf (of, "pdata *");
- fprintf (of, "unkown *");
if (DCL_PTR_CONST (type))
fprintf (of, "const ");
if (DCL_PTR_CONST (type))
fprintf (of, "const ");
+ fprintf (of, "unkown *");
- fprintf (of, "array of ");
+ fprintf (of, "array of");
case V_INT:
if (IS_LONG (type))
fprintf (of, "long ");
case V_INT:
if (IS_LONG (type))
fprintf (of, "long ");
- fprintf (of, "float ");
- fprintf (of, "double ");
+ fprintf (of, "double");
- fprintf (of, "unknown type ");
+ fprintf (of, "unknown type");
+ /* search entry in list before "type" */
+ for (search = start; search && search->next != type;)
+ search = search->next;
+ type = search;
+ if (type)
+ fputc (' ', of);
}
if (nlr)
fprintf (of, "\n");
}
if (nlr)
fprintf (of, "\n");
/*-----------------------------------------------------------------*/
/* cdbTypeInfo - print the type information for debugger */
/*-----------------------------------------------------------------*/
/*-----------------------------------------------------------------*/
/* cdbTypeInfo - print the type information for debugger */
/*-----------------------------------------------------------------*/
cdbTypeInfo (sym_link * type, FILE * of)
{
fprintf (of, "{%d}", getSize (type));
cdbTypeInfo (sym_link * type, FILE * of)
{
fprintf (of, "{%d}", getSize (type));