mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-10 13:09:15 +02:00
* throw error properly if a target does not support sections
This commit is contained in:
parent
665c1b3966
commit
546455faca
@ -445,7 +445,7 @@ scan_e_unexpected_endif=02108_E_$ENDIF directive found without a matching $IF(N)
|
||||
#
|
||||
# Parser
|
||||
#
|
||||
# 03361 is the last used one
|
||||
# 03362 is the last used one
|
||||
#
|
||||
% \section{Parser messages}
|
||||
% This section lists all parser messages. The parser takes care of the
|
||||
@ -1635,6 +1635,8 @@ parser_e_constructurs_cannot_take_type_parameters=03360_E_Constructors cannot ta
|
||||
parser_e_raise_with_noreturn_not_allowed=03361_E_Raise in subroutines declared as noreturn is not allowed
|
||||
% \var{noreturn} tells the compiler that the activation scope of the subroutine is never left. This includes exceptions
|
||||
% goto or any other mean. While the compiler cannot detect all such cases some are trivial and the compiler gives an error.
|
||||
parser_e_section_directive_not_allowed_for_target=03362_E_Directive section not allowed for this target
|
||||
% Only some targets (e.g. Embedded and FreeRTOS) support the section directive.
|
||||
%
|
||||
% \end{description}
|
||||
%
|
||||
|
@ -475,6 +475,7 @@ const
|
||||
parser_e_location_regpair_only_consecutive=03359;
|
||||
parser_e_constructurs_cannot_take_type_parameters=03360;
|
||||
parser_e_raise_with_noreturn_not_allowed=03361;
|
||||
parser_e_section_directive_not_allowed_for_target=03362;
|
||||
type_e_mismatch=04000;
|
||||
type_e_incompatible_types=04001;
|
||||
type_e_not_equal_types=04002;
|
||||
@ -1148,9 +1149,9 @@ const
|
||||
option_info=11024;
|
||||
option_help_pages=11025;
|
||||
|
||||
MsgTxtSize = 89320;
|
||||
MsgTxtSize = 89374;
|
||||
|
||||
MsgIdxMax : array[1..20] of longint=(
|
||||
28,109,362,131,99,63,148,37,223,69,
|
||||
28,109,363,131,99,63,148,37,223,69,
|
||||
65,20,30,1,1,1,1,1,1,1
|
||||
);
|
||||
|
1169
compiler/msgtxt.inc
1169
compiler/msgtxt.inc
File diff suppressed because it is too large
Load Diff
@ -2421,7 +2421,7 @@ begin
|
||||
if pd.typ<>procdef then
|
||||
internalerror(2021032801);
|
||||
if not (target_info.system in systems_allow_section) then
|
||||
Comment(V_Error,'Directive section not allowed for this target.');
|
||||
Message(parser_e_section_directive_not_allowed_for_target);
|
||||
{$ifdef symansistr}
|
||||
tprocdef(pd).section:=get_stringconst;
|
||||
{$else symansistr}
|
||||
|
Loading…
Reference in New Issue
Block a user