summaryrefslogtreecommitdiff
path: root/compiler/scandir.pas
diff options
context:
space:
mode:
authorflorian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2>2011-06-04 20:56:15 +0000
committerflorian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2>2011-06-04 20:56:15 +0000
commit7324d3da2f282920f8f9de1c085c06044d31cec0 (patch)
treefce4e6bccacc19c724aa9daa202904ce23bdf26f /compiler/scandir.pas
parentff70e46a9ca583ce3da9b1b4060dd26acf7ffcf1 (diff)
downloadfpc-7324d3da2f282920f8f9de1c085c06044d31cec0.tar.gz
* allow also smaller values for code alignment parameters than the current one, resolves #19463
* limit code alignment parameters to power of 2 up to 256 * give an error for an invalid code alignment directive git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@17659 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler/scandir.pas')
-rw-r--r--compiler/scandir.pas3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/scandir.pas b/compiler/scandir.pas
index e7cad30f79..c8839cd6af 100644
--- a/compiler/scandir.pas
+++ b/compiler/scandir.pas
@@ -1330,7 +1330,8 @@ unit scandir;
begin
current_scanner.skipspace;
s:=current_scanner.readcomment;
- UpdateAlignmentStr(s,current_settings.alignment);
+ if not(UpdateAlignmentStr(s,current_settings.alignment)) then
+ message(scanner_e_illegal_alignment_directive);
end;
procedure dir_codepage;