mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-06 14:10:23 +02:00
* give error when string[0] decl is found
This commit is contained in:
parent
5271ef0830
commit
162124d10c
@ -88,7 +88,7 @@ type tmsgconst=(
|
||||
parser_e_double_caselabel,
|
||||
parser_e_type_const_not_possible,
|
||||
parser_e_no_overloaded_procvars,
|
||||
parser_e_string_too_long,
|
||||
parser_e_invalid_string_size,
|
||||
parser_w_use_extended_syntax_for_objects,
|
||||
parser_e_class_id_expected,
|
||||
parser_e_no_type_not_allowed_here,
|
||||
|
@ -559,9 +559,9 @@ unit pdecl;
|
||||
do_firstpass(p);
|
||||
if not is_constintnode(p) then
|
||||
Message(cg_e_illegal_expression);
|
||||
if (p^.value<0) then
|
||||
if (p^.value<=0) then
|
||||
begin
|
||||
Message(parser_e_string_too_long);
|
||||
Message(parser_e_invalid_string_size);
|
||||
p^.value:=255;
|
||||
end;
|
||||
consume(RECKKLAMMER);
|
||||
@ -2097,7 +2097,10 @@ unit pdecl;
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.84 1998-11-17 10:40:15 peter
|
||||
Revision 1.85 1998-11-27 14:34:43 peter
|
||||
* give error when string[0] decl is found
|
||||
|
||||
Revision 1.84 1998/11/17 10:40:15 peter
|
||||
* H+ fixes
|
||||
|
||||
Revision 1.83 1998/11/16 11:28:59 pierre
|
||||
|
@ -477,7 +477,7 @@ unit ptconst;
|
||||
datasegment^.concat(new(pai_const,init_8bit(0)));
|
||||
end;
|
||||
if length(s)>0 then
|
||||
Message(parser_e_string_too_long);
|
||||
Message(parser_e_invalid_string_size);
|
||||
end;
|
||||
end;
|
||||
procvardef:
|
||||
@ -647,7 +647,10 @@ unit ptconst;
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.29 1998-11-23 18:26:44 pierre
|
||||
Revision 1.30 1998-11-27 14:34:42 peter
|
||||
* give error when string[0] decl is found
|
||||
|
||||
Revision 1.29 1998/11/23 18:26:44 pierre
|
||||
* fix for bug0182
|
||||
|
||||
Revision 1.28 1998/11/17 10:40:16 peter
|
||||
|
Loading…
Reference in New Issue
Block a user