mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-07 23:30:37 +02:00
* avoid longjmp messages if quitting after compilation error
This commit is contained in:
parent
3b8e03aef6
commit
8aca5d924f
@ -661,12 +661,15 @@ begin
|
||||
CompilerStatus:=false;
|
||||
end;
|
||||
|
||||
const
|
||||
LONGJMPCALLED = -1;
|
||||
|
||||
procedure CompilerStop; {$ifndef FPC}far;{$endif}
|
||||
begin
|
||||
{$ifndef GABOR}
|
||||
{$ifdef HasSignal}
|
||||
if StopJmpValid then
|
||||
Longjmp(StopJmp,1)
|
||||
Longjmp(StopJmp,LONGJMPCALLED)
|
||||
else
|
||||
Halt(1);
|
||||
{$endif}
|
||||
@ -988,6 +991,7 @@ begin
|
||||
Inc(status.errorCount);
|
||||
{$ifdef HasSignal}
|
||||
Case JmpRet of
|
||||
LONGJMPCALLED : s:='Error';
|
||||
SIGINT : s := 'Interrupted by Ctrl-C';
|
||||
SIGILL : s := 'Illegal instruction';
|
||||
SIGSEGV : s := 'Signal Segmentation violation';
|
||||
@ -997,8 +1001,11 @@ begin
|
||||
end;
|
||||
CompilerMessageWindow^.AddMessage(V_error,s+' during compilation','',0,0);
|
||||
{$endif HasSignal}
|
||||
CompilerMessageWindow^.AddMessage(V_error,'Long jumped out of compilation...','',0,0);
|
||||
SetStatus('Long jumped out of compilation...');
|
||||
if JmpRet<>LONGJMPCALLED then
|
||||
begin
|
||||
CompilerMessageWindow^.AddMessage(V_error,'Long jumped out of compilation...','',0,0);
|
||||
SetStatus('Long jumped out of compilation...');
|
||||
end;
|
||||
end;
|
||||
{$ifdef HasSignal}
|
||||
StopJmpValid:=StoreStopJumpValid;
|
||||
@ -1315,7 +1322,10 @@ end;
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.17 2002-11-20 17:35:00 pierre
|
||||
Revision 1.18 2002-12-02 13:58:29 pierre
|
||||
* avoid longjmp messages if quitting after compilation error
|
||||
|
||||
Revision 1.17 2002/11/20 17:35:00 pierre
|
||||
* use target_os.ExeExt for compiled executable
|
||||
|
||||
Revision 1.16 2002/10/23 19:19:40 hajny
|
||||
|
15
ide/test.pas
15
ide/test.pas
@ -157,7 +157,22 @@ var i : longint;
|
||||
Length : longint;
|
||||
|
||||
BEGIN
|
||||
{$ifdef m68k}
|
||||
asm
|
||||
beq @L13
|
||||
bhi @L13
|
||||
blo @L13
|
||||
dbeq d0,@L13
|
||||
dbcs d0,@L13
|
||||
// dblo d0,@L13
|
||||
@L13:
|
||||
end;
|
||||
{$endif}
|
||||
ClassVar1:=TClass2.create;
|
||||
Obj1.Init;
|
||||
pointer2:=@Obj1;
|
||||
Writeln('Obj1.Z=',Obj1.Z);
|
||||
Obj1.done;
|
||||
X:=nil;
|
||||
// fg
|
||||
for i:=1 to 2000 do
|
||||
|
@ -21,7 +21,8 @@ function IsOdd(X: integer): boolean;
|
||||
var Z: byte;
|
||||
begin
|
||||
Z:=0;
|
||||
X:=Z*X{$ifdef i386}*Test8087{$endif};
|
||||
X:=Z*X{$ifdef cpui386}*
|
||||
Test8087{$endif};
|
||||
IsOdd:=(X mod 2)=1;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user