+/*-----------------------------------------------------------------*/
+/* printIvalUnion - generates initial value for unions */
+/*-----------------------------------------------------------------*/
+void pic16_printIvalUnion (symbol * sym, sym_link * type,
+ initList * ilist, char ptype, void *p)
+{
+ //symbol *sflds;
+ initList *iloop = NULL;
+ int i, size;
+
+
+#if DEBUG_PRINTIVAL
+ fprintf(stderr, "%s\n",__FUNCTION__);
+#endif
+
+ iloop = ilist;
+ i = 0;
+ while (iloop)
+ {
+ i++;
+ iloop = iloop->next;
+ } // while
+
+ size = -1;
+ if (type) size = SPEC_STRUCT(type)->size;
+
+ if (i == 1 && size >= 0 && size <= sizeof(long))
+ {
+ unsigned long val = (unsigned long)floatFromVal(list2val(ilist));
+ while (size--)
+ {
+ pic16_emitDB(val, ptype, p);
+ val >>= 8;
+ } // while
+ return;
+ } // if
+
+ fprintf( stderr, "INCOMPLETE SUPPORT FOR INITIALIZED union---FALLING BACK TO struct\n" );
+ fprintf( stderr, "This is a bug. Please file a bug-report with your source attached.\n" );
+ pic16_printIvalStruct( sym, type, ilist, ptype, p );
+}
+
+static int
+pic16_isUnion( symbol *sym, sym_link *type )
+{
+ if (type && SPEC_STRUCT(type)->type == UNION) return 1;
+ return 0;
+}
+