diff --git a/components/fpdebug/fpimgreaderwinpe.pas b/components/fpdebug/fpimgreaderwinpe.pas index 10ded83919..abe2b203c8 100644 --- a/components/fpdebug/fpimgreaderwinpe.pas +++ b/components/fpdebug/fpimgreaderwinpe.pas @@ -470,7 +470,7 @@ begin FCodeBase := NtHeaders.W32.OptionalHeader.BaseOfCode; SectionMax := FFileLoader.LoadMemory( DosHeader.e_lfanew + - (@NtHeaders.Sys.OptionalHeader - @NtHeaders.Sys) + + (Pointer(@NtHeaders.Sys.OptionalHeader) - @NtHeaders.Sys) + NtHeaders.Sys.FileHeader.SizeOfOptionalHeader, SizeOf(TImageSectionHeader) * NtHeaders.Sys.FileHeader.NumberOfSections, SectionHeader diff --git a/components/freetype/ttprofile.pas b/components/freetype/ttprofile.pas index 84e06ab7a7..a9d9d16085 100644 --- a/components/freetype/ttprofile.pas +++ b/components/freetype/ttprofile.pas @@ -1,6 +1,7 @@ unit TTProfile; {$R-} // TODO: Fix out-of-bounds accesses. +{$T-} // TODO: Fix compilation with -Sy. {$mode objfpc}{$H+} interface diff --git a/components/lazutils/masks.pas b/components/lazutils/masks.pas index 262de0799f..dd86f01f8c 100644 --- a/components/lazutils/masks.pas +++ b/components/lazutils/masks.pas @@ -15,6 +15,7 @@ } unit Masks; +{$T-} // TODO: Fix compilation with -Sy. {$mode objfpc}{$H+} {.$define debug_maskcompiled} {.$define debug_anycharornone} diff --git a/components/macroscript/emscriptclasses.pas b/components/macroscript/emscriptclasses.pas index 0a703c9547..4250014c6d 100644 --- a/components/macroscript/emscriptclasses.pas +++ b/components/macroscript/emscriptclasses.pas @@ -390,7 +390,7 @@ begin Result := PPSVariantPointer(res)^.DataDest; end else - Result := @(PPSVariantRecord(res)^.data); + Result := PPoint(@(PPSVariantRecord(res)^.data)); if typerec.BaseType <> btRecord then raise TEMScriptBadParamException.Create('Invalid result type for "point(x,y)"'); if typerec.RealSize <> SizeOf({$IFDEF NeedTPointFix}TPoint2{$ELSE}TPoint{$ENDIF}) then raise TEMScriptBadParamException.Create('Invalid result size for "point(x,y)"'); diff --git a/components/multithreadprocs/mtputils.pas b/components/multithreadprocs/mtputils.pas index 002c480133..0e8372825b 100644 --- a/components/multithreadprocs/mtputils.pas +++ b/components/multithreadprocs/mtputils.pas @@ -61,7 +61,7 @@ var Sorter: TParallelSortPointerList; begin if List.Count<=1 then exit; - Sorter:=TParallelSortPointerList.Create(@List.List[0],List.Count,Compare, + Sorter:=TParallelSortPointerList.Create(PPointer(@List.List[0]),List.Count,Compare, MaxThreadCount); try Sorter.OnSortPart:=OnSortPart; diff --git a/components/virtualtreeview/laz.virtualtrees.pas b/components/virtualtreeview/laz.virtualtrees.pas index 6aefa3da59..0e75a57c2f 100644 --- a/components/virtualtreeview/laz.virtualtrees.pas +++ b/components/virtualtreeview/laz.virtualtrees.pas @@ -17308,7 +17308,7 @@ begin GetKeyboardState(KeyState); // Avoid conversion to control characters. We have captured the control key state already in Shift. KeyState[VK_CONTROL] := 0; - if ToASCII(Message.CharCode, (Message.KeyData shr 16) and 7, KeyState, @Buffer, 0) > 0 then + if ToASCII(Message.CharCode, (Message.KeyData shr 16) and 7, KeyState, PWord(@Buffer), 0) > 0 then begin case Buffer[0] of '*': @@ -17326,7 +17326,7 @@ begin // there is a problem with ToASCII when used in conjunction with dead chars. // The article recommends to call ToASCII twice to restore a deleted flag in the key message // structure under certain circumstances. It turned out it is best to always call ToASCII twice. - ToASCII(Message.CharCode, (Message.KeyData shr 16) and 7, KeyState, @Buffer, 0); + ToASCII(Message.CharCode, (Message.KeyData shr 16) and 7, KeyState, PWord(@Buffer), 0); {$endif} case CharCode of VK_F2: diff --git a/ide/buildprofilemanager.pas b/ide/buildprofilemanager.pas index 4199a31c2d..996f8cfe09 100644 --- a/ide/buildprofilemanager.pas +++ b/ide/buildprofilemanager.pas @@ -393,7 +393,7 @@ begin // FPC on darwin has a bug with -Cr fOptions.Add('-gw -gl -godwarfsets -gh -gt -Co -Ci -Sa'); {$ELSE} - fOptions.Add('-gw3 -gl -gh -gt -Co -Cr -Ci -Sa'); + fOptions.Add('-gw3 -gl -gh -gt -Co -Cr -Ci -Sa -Sy'); {$ENDIF} end; Add(Profile);