mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2026-02-04 06:34:52 +01:00
* treat all "uninitialized" hints as warnings on JVM platforms, because
they generally result in fatal run time errors there git-svn-id: trunk@22571 -
This commit is contained in:
parent
f8288d1b53
commit
76b0ee9925
@ -1190,14 +1190,20 @@ implementation
|
||||
begin
|
||||
if tloadnode(p).symtable.symtabletype=localsymtable then
|
||||
begin
|
||||
if (vsf_use_hints in varstateflags) then
|
||||
{ on the JVM, an uninitialized var-parameter
|
||||
is just as fatal as a nil pointer dereference }
|
||||
if (vsf_use_hints in varstateflags) and
|
||||
not(target_info.system in systems_jvm) then
|
||||
CGMessagePos1(p.fileinfo,sym_h_uninitialized_local_variable,hsym.realname)
|
||||
else
|
||||
CGMessagePos1(p.fileinfo,sym_w_uninitialized_local_variable,hsym.realname);
|
||||
end
|
||||
else
|
||||
begin
|
||||
if (vsf_use_hints in varstateflags) then
|
||||
{ on the JVM, an uninitialized var-parameter
|
||||
is just as fatal as a nil pointer dereference }
|
||||
if (vsf_use_hints in varstateflags) and
|
||||
not(target_info.system in systems_jvm) then
|
||||
CGMessagePos1(p.fileinfo,sym_h_uninitialized_variable,hsym.realname)
|
||||
else
|
||||
CGMessagePos1(p.fileinfo,sym_w_uninitialized_variable,hsym.realname);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user