mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-21 07:01:51 +02:00
* allow explicit conversion of enumeration values (in addition to integers) to object references in Delphi mode
git-svn-id: trunk@11398 -
This commit is contained in:
parent
70e7932fe4
commit
6958bbfdda
@ -1259,7 +1259,7 @@ implementation
|
||||
end
|
||||
{ ugly, but delphi allows it }
|
||||
else if (eq=te_incompatible) and
|
||||
(def_from.typ=orddef) and
|
||||
(def_from.typ in [orddef,enumdef]) and
|
||||
(m_delphi in current_settings.modeswitches) and
|
||||
(cdo_explicit in cdoptions) then
|
||||
begin
|
||||
|
@ -79,26 +79,32 @@ unit raatt;
|
||||
|
||||
type
|
||||
tattreader = class(tasmreader)
|
||||
protected
|
||||
actasmtoken : tasmtoken;
|
||||
prevasmtoken : tasmtoken;
|
||||
procedure SetupTables;
|
||||
procedure BuildConstant(constsize: byte);
|
||||
procedure BuildRecordOffsetSize(const expr: string;var offset:aint;var size:aint; var mangledname: string; needvmtofs: boolean);
|
||||
function BuildConstExpression(allowref,betweenbracket:boolean): aint;
|
||||
procedure BuildConstSymbolExpression(allowref,betweenbracket,needofs:boolean;var value:aint;var asmsym:string;var asmsymtyp:TAsmsymtype);
|
||||
procedure BuildConstantOperand(oper : toperand);
|
||||
procedure BuildConstant(constsize: byte);
|
||||
procedure BuildRealConstant(typ : tfloattype);
|
||||
procedure BuildStringConstant(asciiz: boolean);
|
||||
procedure BuildRecordOffsetSize(const expr: string;var offset:aint;var size:aint; var mangledname: string; needvmtofs: boolean);
|
||||
procedure BuildConstSymbolExpression(allowref,betweenbracket,needofs:boolean;var value:aint;var asmsym:string;var asmsymtyp:TAsmsymtype);
|
||||
function BuildConstExpression(allowref,betweenbracket:boolean): aint;
|
||||
private
|
||||
procedure SetupTables;
|
||||
public
|
||||
function Assemble: tlinkedlist;override;
|
||||
protected
|
||||
procedure handleopcode;virtual;abstract;
|
||||
function is_asmopcode(const s: string) : boolean;virtual;abstract;
|
||||
Function is_asmdirective(const s: string):boolean;
|
||||
function is_register(const s:string):boolean;virtual;
|
||||
function is_locallabel(const s: string):boolean;
|
||||
procedure GetToken;
|
||||
function consume(t : tasmtoken):boolean;
|
||||
procedure RecoverConsume(allowcomma:boolean);
|
||||
procedure handlepercent;virtual;
|
||||
private
|
||||
Function is_asmdirective(const s: string):boolean;
|
||||
procedure GetToken;
|
||||
protected
|
||||
function is_locallabel(const s: string):boolean;
|
||||
procedure RecoverConsume(allowcomma:boolean);
|
||||
function consume(t : tasmtoken):boolean;
|
||||
end;
|
||||
tcattreader = class of tattreader;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user