diff options
author | svenbarth <svenbarth@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2015-09-04 14:50:16 +0000 |
---|---|---|
committer | svenbarth <svenbarth@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2015-09-04 14:50:16 +0000 |
commit | 705a39df48274c80896b0b963be5d6435872d998 (patch) | |
tree | fe96f2665c54692d7d985c7ec3f8c7e1778aa01b /compiler/symsym.pas | |
parent | e214f496bee9d8488ab4b8a4dd9ad2ce9b869b2a (diff) | |
download | fpc-705a39df48274c80896b0b963be5d6435872d998.tar.gz |
symsym.pas:
+ add an overload of check_hints() that allows to specify the current file position
* have the previous check_hints() procedure be an inline procedure as it simply calls the new overload
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@31513 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler/symsym.pas')
-rw-r--r-- | compiler/symsym.pas | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/compiler/symsym.pas b/compiler/symsym.pas index 9519732954..378f2c675f 100644 --- a/compiler/symsym.pas +++ b/compiler/symsym.pas @@ -484,7 +484,8 @@ interface function internal_static_field_name(const fieldname: TSymStr): TSymStr; function get_high_value_sym(vs: tparavarsym):tsym; { marking it as inline causes IE 200311075 during loading from ppu file } - procedure check_hints(const srsym: tsym; const symoptions: tsymoptions; const deprecatedmsg : pshortstring); + procedure check_hints(const srsym: tsym; const symoptions: tsymoptions; const deprecatedmsg : pshortstring);inline; + procedure check_hints(const srsym: tsym; const symoptions: tsymoptions; const deprecatedmsg : pshortstring;filepos:tfileposinfo); implementation @@ -523,21 +524,27 @@ implementation procedure check_hints(const srsym: tsym; const symoptions: tsymoptions; const deprecatedmsg : pshortstring); begin + check_hints(srsym,symoptions,deprecatedmsg,current_filepos); + end; + + + procedure check_hints(const srsym: tsym; const symoptions: tsymoptions; const deprecatedmsg : pshortstring;filepos:tfileposinfo); + begin if not assigned(srsym) then internalerror(200602051); if sp_hint_deprecated in symoptions then if (sp_has_deprecated_msg in symoptions) and (deprecatedmsg <> nil) then - Message2(sym_w_deprecated_symbol_with_msg,srsym.realname,deprecatedmsg^) + MessagePos2(filepos,sym_w_deprecated_symbol_with_msg,srsym.realname,deprecatedmsg^) else - Message1(sym_w_deprecated_symbol,srsym.realname); + MessagePos1(filepos,sym_w_deprecated_symbol,srsym.realname); if sp_hint_experimental in symoptions then - Message1(sym_w_experimental_symbol,srsym.realname); + MessagePos1(filepos,sym_w_experimental_symbol,srsym.realname); if sp_hint_platform in symoptions then - Message1(sym_w_non_portable_symbol,srsym.realname); + MessagePos1(filepos,sym_w_non_portable_symbol,srsym.realname); if sp_hint_library in symoptions then - Message1(sym_w_library_symbol,srsym.realname); + MessagePos1(filepos,sym_w_library_symbol,srsym.realname); if sp_hint_unimplemented in symoptions then - Message1(sym_w_non_implemented_symbol,srsym.realname); + MessagePos1(filepos,sym_w_non_implemented_symbol,srsym.realname); end; {**************************************************************************** |