synopse / mORMot2

OpenSource RESTful ORM/SOA/MVC Framework for Delphi and FreePascal
https://synopse.info
Other
531 stars 132 forks source link

Deal with warning 6060 only since FPC 3.3.1 #295

Closed michaliskambi closed 2 months ago

michaliskambi commented 2 months ago

Compiling with FPC 3.2.2 is causing a large number of repeated warnings:

...\mormot.defines.inc(146,4) Warning: Illegal identifier "6060" for $WARN directive

That's because the relevant warning (and the mechanism to analyze case, we call it case analysis in CGE coding conventions) is only in FPC 3.3.1. So using {$WARN 6060 off} is only allowed (without the compiler complaining) since FPC 3.3.1.

This proposed PR avoids the warning for older FPC version.

(This PR makes assumption that FPC older than 3.2.x is not supported by mORMot 2 at all -- if they are, then a different check for FPC version is needed.)

synopse commented 2 months ago

I have added proper version support, because we could indeed run on older FPC. :)