mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 07:09:18 +02:00
* give an error when trying to define a macro/compiler variable with
an empty name git-svn-id: trunk@47300 -
This commit is contained in:
parent
1c61c30cd2
commit
38a059f039
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -12658,6 +12658,7 @@ tests/tbf/tb0268.pp svneol=native#text/pascal
|
|||||||
tests/tbf/tb0269.pp svneol=native#text/pascal
|
tests/tbf/tb0269.pp svneol=native#text/pascal
|
||||||
tests/tbf/tb0270.pp svneol=native#text/pascal
|
tests/tbf/tb0270.pp svneol=native#text/pascal
|
||||||
tests/tbf/tb0271.pp svneol=native#text/pascal
|
tests/tbf/tb0271.pp svneol=native#text/pascal
|
||||||
|
tests/tbf/tb0272.pp svneol=native#text/plain
|
||||||
tests/tbf/tb0588.pp svneol=native#text/pascal
|
tests/tbf/tb0588.pp svneol=native#text/pascal
|
||||||
tests/tbf/ub0115.pp svneol=native#text/plain
|
tests/tbf/ub0115.pp svneol=native#text/plain
|
||||||
tests/tbf/ub0149.pp svneol=native#text/plain
|
tests/tbf/ub0149.pp svneol=native#text/plain
|
||||||
|
@ -432,6 +432,7 @@ scan_w_setpeosversion_not_support=02103_W_SETPEOSVERSION is not supported by the
|
|||||||
scan_w_setpesubsysversion_not_support=02104_W_SETPESUBSYSVERSION is not supported by the target OS
|
scan_w_setpesubsysversion_not_support=02104_W_SETPESUBSYSVERSION is not supported by the target OS
|
||||||
% The \var{\{\$SETPESUBSYSVERSION\}} directive is not supported by the target OS.
|
% The \var{\{\$SETPESUBSYSVERSION\}} directive is not supported by the target OS.
|
||||||
scan_n_changecputype=02105_N_Changed CPU type to be consistent with specified controller
|
scan_n_changecputype=02105_N_Changed CPU type to be consistent with specified controller
|
||||||
|
scan_e_emptymacroname=02106_E_A macro/compiler variable name cannot be empty
|
||||||
% \end{description}
|
% \end{description}
|
||||||
#
|
#
|
||||||
# Parser
|
# Parser
|
||||||
|
@ -129,6 +129,7 @@ const
|
|||||||
scan_w_setpeosversion_not_support=02103;
|
scan_w_setpeosversion_not_support=02103;
|
||||||
scan_w_setpesubsysversion_not_support=02104;
|
scan_w_setpesubsysversion_not_support=02104;
|
||||||
scan_n_changecputype=02105;
|
scan_n_changecputype=02105;
|
||||||
|
scan_e_emptymacroname=02106;
|
||||||
parser_e_syntax_error=03000;
|
parser_e_syntax_error=03000;
|
||||||
parser_e_dont_nest_interrupt=03004;
|
parser_e_dont_nest_interrupt=03004;
|
||||||
parser_w_proc_directive_ignored=03005;
|
parser_w_proc_directive_ignored=03005;
|
||||||
@ -1133,9 +1134,9 @@ const
|
|||||||
option_info=11024;
|
option_info=11024;
|
||||||
option_help_pages=11025;
|
option_help_pages=11025;
|
||||||
|
|
||||||
MsgTxtSize = 86403;
|
MsgTxtSize = 86458;
|
||||||
|
|
||||||
MsgIdxMax : array[1..20] of longint=(
|
MsgIdxMax : array[1..20] of longint=(
|
||||||
28,106,360,130,99,63,145,36,223,68,
|
28,107,360,130,99,63,145,36,223,68,
|
||||||
62,20,30,1,1,1,1,1,1,1
|
62,20,30,1,1,1,1,1,1,1
|
||||||
);
|
);
|
||||||
|
1537
compiler/msgtxt.inc
1537
compiler/msgtxt.inc
File diff suppressed because it is too large
Load Diff
@ -2256,6 +2256,11 @@ type
|
|||||||
begin
|
begin
|
||||||
current_scanner.skipspace;
|
current_scanner.skipspace;
|
||||||
hs:=current_scanner.readid;
|
hs:=current_scanner.readid;
|
||||||
|
if hs='' then
|
||||||
|
begin
|
||||||
|
Message(scan_e_emptymacroname);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
mac:=tmacro(search_macro(hs));
|
mac:=tmacro(search_macro(hs));
|
||||||
if not assigned(mac) or (mac.owner <> current_module.localmacrosymtable) then
|
if not assigned(mac) or (mac.owner <> current_module.localmacrosymtable) then
|
||||||
begin
|
begin
|
||||||
|
5
tests/tbf/tb0272.pp
Normal file
5
tests/tbf/tb0272.pp
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{ %fail }
|
||||||
|
{$define #test}
|
||||||
|
|
||||||
|
begin
|
||||||
|
end.
|
Loading…
Reference in New Issue
Block a user