mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-19 20:39:25 +02:00
* Allow widechar sets, reduce to ansichar set
This commit is contained in:
parent
adf9f98f7c
commit
56006aa002
@ -1651,6 +1651,9 @@ parser_e_promising_exports_not_supported_on_current_platform=03367_E_Declaring e
|
||||
% Promising exports are WebAssembly-specific. They are not allowed on other platforms.
|
||||
parser_e_suspending_externals_not_supported_on_current_platform=03368_E_Declaring externals as 'suspending' is WebAssembly-specific and is not supported on the current platform
|
||||
% Suspending externals are WebAssembly-specific. They are not allowed on other platforms.
|
||||
parser_w_widechar_set_reduced=03369_W_Reducing Widechar set to single-byte AnsiChar set.
|
||||
% The base type of a set can only have 255 elements. Sets of wide characters
|
||||
% are reduced to sets of 1-byte characters.
|
||||
%
|
||||
% \end{description}
|
||||
%
|
||||
|
@ -482,6 +482,7 @@ const
|
||||
parser_e_wasm_ref_types_can_only_be_passed_by_value=03366;
|
||||
parser_e_promising_exports_not_supported_on_current_platform=03367;
|
||||
parser_e_suspending_externals_not_supported_on_current_platform=03368;
|
||||
parser_w_widechar_set_reduced=03369;
|
||||
type_e_mismatch=04000;
|
||||
type_e_incompatible_types=04001;
|
||||
type_e_not_equal_types=04002;
|
||||
@ -1167,9 +1168,9 @@ const
|
||||
option_info=11024;
|
||||
option_help_pages=11025;
|
||||
|
||||
MsgTxtSize = 91554;
|
||||
MsgTxtSize = 91613;
|
||||
|
||||
MsgIdxMax : array[1..20] of longint=(
|
||||
28,109,369,134,102,63,148,38,223,71,
|
||||
28,109,370,134,102,63,148,38,223,71,
|
||||
68,20,30,1,1,1,1,1,1,1
|
||||
);
|
||||
|
1211
compiler/msgtxt.inc
1211
compiler/msgtxt.inc
File diff suppressed because it is too large
Load Diff
@ -1320,8 +1320,17 @@ implementation
|
||||
Message(sym_e_ill_type_decl_set);
|
||||
orddef :
|
||||
begin
|
||||
if (torddef(tt2).ordtype<>uvoid) and
|
||||
(torddef(tt2).ordtype<>uwidechar) and
|
||||
if (torddef(tt2).ordtype=uwidechar) then
|
||||
begin
|
||||
if (m_default_unicodestring in current_settings.modeswitches) then
|
||||
begin
|
||||
Message(parser_w_widechar_set_reduced);
|
||||
def:=csetdef.create(cansichartype,torddef(cansichartype).low.svalue,torddef(cansichartype).high.svalue,true);
|
||||
end
|
||||
else
|
||||
Message(sym_e_ill_type_decl_set);
|
||||
end
|
||||
else if (torddef(tt2).ordtype<>uvoid) and
|
||||
(torddef(tt2).low>=0) then
|
||||
// !! def:=csetdef.create(tt2,torddef(tt2.def).low,torddef(tt2.def).high),true)
|
||||
if Torddef(tt2).high>int64(high(byte)) then
|
||||
|
@ -546,6 +546,7 @@ Type
|
||||
{ Zero - terminated strings }
|
||||
|
||||
{$IF DECLARED(AnsiChar)}
|
||||
=======
|
||||
// Compiler defines AnsiChar and WideChar, not AnsiChar
|
||||
{$IFDEF UNICODERTL}
|
||||
Char = WideChar;
|
||||
|
Loading…
Reference in New Issue
Block a user