static void DuplicateQualifier (const char* Name)
/* Print an error message */
{
- Warning ("Duplicate qualifier: `%s'", Name);
+ Warning ("Duplicate qualifier: '%s'", Name);
}
Entry = AddStructSym (Name, Type, 0, 0);
} else if ((Entry->Flags & SC_TYPEMASK) != Type) {
/* Already defined, but no struct */
- Error ("Symbol `%s' is already different kind", Name);
+ Error ("Symbol '%s' is already different kind", Name);
}
return Entry;
}
/* Check for fields without a name */
if (Decl.Ident[0] == '\0') {
/* In cc65 mode, we allow anonymous structs/unions within
- ** a struct.
+ ** a union.
*/
if (IS_Get (&Standard) >= STD_CC65 && IsClassStruct (Decl.Type)) {
/* This is an anonymous struct or union. Copy the fields
** into the current level.
*/
- CopyAnonStructFields (&Decl, 0);
+ FieldSize = CopyAnonStructFields (&Decl, 0);
+ if (FieldSize > UnionSize) {
+ UnionSize = FieldSize;
+ }
} else {
/* A non bit-field without a name is legal but useless */
Entry = FindTagSym (CurTok.Ident);
if (Entry) {
if (SymIsLocal (Entry) && (Entry->Flags & SC_ENUM) == 0) {
- Error ("Symbol `%s' is already different kind", Entry->Name);
+ Error ("Symbol '%s' is already different kind", Entry->Name);
}
} else {
/* Insert entry into table ### */
Sym->Flags &= ~SC_DEFTYPE;
} else {
/* Type has already been changed */
- Error ("Redefinition for parameter `%s'", Sym->Name);
+ Error ("Redefinition for parameter '%s'", Sym->Name);
}
} else {
- Error ("Unknown identifier: `%s'", Decl.Ident);
+ Error ("Unknown identifier: '%s'", Decl.Ident);
}
}
/* If the parameter is a struct or union, emit a warning */
if (IsClassStruct (Decl.Type)) {
if (IS_Get (&WarnStructParam)) {
- Warning ("Passing struct by value for parameter `%s'", Decl.Ident);
+ Warning ("Passing struct by value for parameter '%s'", Decl.Ident);
}
}
ConstAbsIntExpr (hie1, &Expr);
if (Expr.IVal <= 0) {
if (D->Ident[0] != '\0') {
- Error ("Size of array `%s' is invalid", D->Ident);
+ Error ("Size of array '%s' is invalid", D->Ident);
} else {
Error ("Size of array is invalid");
}
/* If we have remaining qualifiers, flag them as invalid */
if (Qualifiers & T_QUAL_NEAR) {
- Error ("Invalid `__near__' qualifier");
+ Error ("Invalid '__near__' qualifier");
}
if (Qualifiers & T_QUAL_FAR) {
- Error ("Invalid `__far__' qualifier");
+ Error ("Invalid '__far__' qualifier");
}
if (Qualifiers & T_QUAL_FASTCALL) {
- Error ("Invalid `__fastcall__' qualifier");
+ Error ("Invalid '__fastcall__' qualifier");
}
if (Qualifiers & T_QUAL_CDECL) {
- Error ("Invalid `__cdecl__' qualifier");
+ Error ("Invalid '__cdecl__' qualifier");
}
}
** have the C89 standard enabled explicitly.
*/
if (IS_Get (&Standard) >= STD_C99) {
- Warning ("Implicit `int' return type is an obsolete feature");
+ Warning ("Implicit 'int' return type is an obsolete feature");
}
GetFuncDesc (D->Type)->Flags |= FD_OLDSTYLE_INTRET;
}
** for variables with implicit int type.
*/
if ((Spec->Flags & DS_DEF_TYPE) != 0 && IS_Get (&Standard) >= STD_C99) {
- Warning ("Implicit `int' is an obsolete feature");
+ Warning ("Implicit 'int' is an obsolete feature");
}
}
unsigned Size = SizeOf (D->Type);
if (Size >= 0x10000) {
if (D->Ident[0] != '\0') {
- Error ("Size of `%s' is invalid (0x%06X)", D->Ident, Size);
+ Error ("Size of '%s' is invalid (0x%06X)", D->Ident, Size);
} else {
Error ("Invalid size in declaration (0x%06X)", Size);
}
NextToken ();
}
if (BraceCount < BracesNeeded) {
- Error ("`{' expected");
+ Error ("'{' expected");
}
return BraceCount;
}
NextToken ();
NextToken ();
} else {
- Error ("`}' expected");
+ Error ("'}' expected");
return;
}
--BracesExpected;