+
+ /* We have a symbol with this name already */
+ Error ("Multiple definition for `%s'", Name);
+
+ } else {
+
+ /* Create a new entry */
+ Entry = NewSymEntry (Name, SC_BITFIELD);
+
+ /* Set the symbol attributes. Bit-fields are always of type unsigned */
+ Entry->Type = type_uint;
+ Entry->V.B.Offs = Offs;
+ Entry->V.B.BitOffs = BitOffs;
+ Entry->V.B.BitWidth = Width;
+
+ /* Add the entry to the symbol table */
+ AddSymEntry (SymTab, Entry);
+
+ }
+
+ /* Return the entry */
+ return Entry;
+}
+
+
+
+SymEntry* AddConstSym (const char* Name, const Type* T, unsigned Flags, long Val)
+/* Add an constant symbol to the symbol table and return it */
+{
+ /* Enums must be inserted in the global symbol table */
+ SymTable* Tab = ((Flags & SC_ENUM) == SC_ENUM)? SymTab0 : SymTab;
+
+ /* Do we have an entry with this name already? */
+ SymEntry* Entry = FindSymInTable (Tab, Name, HashStr (Name));
+ if (Entry) {
+ if ((Entry->Flags & SC_CONST) != SC_CONST) {