* throw an error if threadvars are used but not supported

* fix building for arm-embedded

git-svn-id: trunk@23452 -
This commit is contained in:
florian 2013-01-19 15:17:47 +00:00
parent 9e6a2b868c
commit 81e0e3114c
3 changed files with 13 additions and 4 deletions

View File

@ -839,7 +839,13 @@ implementation
consume(_THREADVAR);
if not(symtablestack.top.symtabletype in [staticsymtable,globalsymtable]) then
message(parser_e_threadvars_only_sg);
read_var_decls([vd_threadvar]);
if f_threading in features then
read_var_decls([vd_threadvar])
else
begin
Message(parser_f_unsupported_feature);
read_var_decls([]);
end;
end;

View File

@ -554,11 +554,10 @@ procedure fpc_raise_nested; compilerproc;
function fpc_help_constructor(_self:pointer;var _vmt:pointer;_vmt_pos:cardinal):pointer;compilerproc;
procedure fpc_help_destructor(_self,_vmt:pointer;vmt_pos:cardinal);compilerproc;
procedure fpc_help_fail(_self:pointer;var _vmt:pointer;vmt_pos:cardinal);compilerproc;
{$endif FPC_HAS_FEATURE_OBJECTS}
procedure fpc_check_object(_vmt:pointer); compilerproc;
procedure fpc_check_object_ext(vmt,expvmt:pointer);compilerproc;
{$endif FPC_HAS_FEATURE_OBJECTS}
{$ifdef FPC_HAS_FEATURE_RTTI}

View File

@ -1698,7 +1698,11 @@ const
{ how many bytes of the string have been processed already (used for readstr) }
BytesReadIndex = 17;
threadvar
{$ifdef FPC_HAS_FEATURE_THREADING}
ThreadVar
{$else FPC_HAS_FEATURE_THREADING}
Var
{$endif FPC_HAS_FEATURE_THREADING}
ReadWriteStrText: textrec;
procedure WriteStrShort(var t: textrec);