mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-24 23:10:38 +02:00
* discardresult modifier
git-svn-id: trunk@49013 -
(cherry picked from commit 702322cfde
)
This commit is contained in:
parent
2ccfde90d0
commit
8d7f707d31
@ -1075,7 +1075,7 @@ type
|
|||||||
pmExport, pmOverload, pmMessage, pmReintroduce,
|
pmExport, pmOverload, pmMessage, pmReintroduce,
|
||||||
pmInline, pmAssembler, pmPublic,
|
pmInline, pmAssembler, pmPublic,
|
||||||
pmCompilerProc, pmExternal, pmForward, pmDispId,
|
pmCompilerProc, pmExternal, pmForward, pmDispId,
|
||||||
pmNoReturn, pmFar, pmFinal);
|
pmNoReturn, pmFar, pmFinal, pmDiscardResult);
|
||||||
TProcedureModifiers = Set of TProcedureModifier;
|
TProcedureModifiers = Set of TProcedureModifier;
|
||||||
TProcedureMessageType = (pmtNone,pmtInteger,pmtString);
|
TProcedureMessageType = (pmtNone,pmtInteger,pmtString);
|
||||||
|
|
||||||
@ -1779,7 +1779,7 @@ const
|
|||||||
'export', 'overload', 'message', 'reintroduce',
|
'export', 'overload', 'message', 'reintroduce',
|
||||||
'inline','assembler','public',
|
'inline','assembler','public',
|
||||||
'compilerproc','external','forward','dispid',
|
'compilerproc','external','forward','dispid',
|
||||||
'noreturn','far','final');
|
'noreturn','far','final','discardresult');
|
||||||
|
|
||||||
VariableModifierNames : Array[TVariableModifier] of string
|
VariableModifierNames : Array[TVariableModifier] of string
|
||||||
= ('cvar', 'external', 'public', 'export', 'class', 'static');
|
= ('cvar', 'external', 'public', 'export', 'class', 'static');
|
||||||
|
@ -140,6 +140,7 @@ type
|
|||||||
Procedure TestFunctionVarArgs;
|
Procedure TestFunctionVarArgs;
|
||||||
Procedure TestProcedureCDeclVarargs;
|
Procedure TestProcedureCDeclVarargs;
|
||||||
Procedure TestFunctionCDeclVarArgs;
|
Procedure TestFunctionCDeclVarArgs;
|
||||||
|
procedure TestFunctionDiscardResult;
|
||||||
Procedure TestProcedureForwardInterface;
|
Procedure TestProcedureForwardInterface;
|
||||||
Procedure TestFunctionForwardInterface;
|
Procedure TestFunctionForwardInterface;
|
||||||
Procedure TestProcedureForward;
|
Procedure TestProcedureForward;
|
||||||
@ -879,6 +880,13 @@ begin
|
|||||||
AssertProc([],[],ccSysCall,0);
|
AssertProc([],[],ccSysCall,0);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TTestProcedureFunction.TestFunctionDiscardResult;
|
||||||
|
begin
|
||||||
|
AddDeclaration('function A : Integer; discardresult');
|
||||||
|
ParseFunction;
|
||||||
|
AssertFunc([pmDiscardResult],[],ccDefault,0);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TTestProcedureFunction.TestCallingConventionHardFloat;
|
procedure TTestProcedureFunction.TestCallingConventionHardFloat;
|
||||||
begin
|
begin
|
||||||
ParseProcedure('; HardFloat');
|
ParseProcedure('; HardFloat');
|
||||||
|
@ -513,7 +513,8 @@ const
|
|||||||
'DispId',
|
'DispId',
|
||||||
'NoReturn',
|
'NoReturn',
|
||||||
'Far',
|
'Far',
|
||||||
'Final'
|
'Final',
|
||||||
|
'DiscardResult'
|
||||||
);
|
);
|
||||||
PCUProcedureModifiersImplProc = [pmInline,pmAssembler,pmCompilerProc,pmNoReturn];
|
PCUProcedureModifiersImplProc = [pmInline,pmAssembler,pmCompilerProc,pmNoReturn];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user