Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2008-09

Compiler messages configuration.

2 messages · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

mitya boyarintsev

Hello, Developers

I've been developing delphi for quite some times, and number of fpc compiler messages (hints and notes) really puzzels me (like "constant not used", "parameter not used" etc).

It would not be a real problem, but the code i'm compiling is used for both fpc and delphi compilers, and adding lines, just to keep fpc compiler happy, does not seem to be a good solution. As well as disabling all hints and notes.

Here's the solution. Providing the custom compiler messsages file (-Fr) can actually disable, some of the messages to appear. No just providing empty lines, but even removing any warning/hint/note message is marked as 'tried' (_T_) in custom message file, then compiler never gives out a message line.

Here's the GUI tool (lazarus project, fpc sources are required to compile) that may help you in generating proper custom message file:

User manual:

- (if need, compile and) start util

- uncheck any note/hint/warn message you don't want to see

- save file

- compiling the project, provide saved file for compiler with -Fr key. (for lazarus, you can write it at 'Compiler Options\other\Custom options')

That's it. Unfortanutally this 'remedy' is pure hack, and I'm not sure if this style of message silencing should be used.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20080924/3ef32ccd/attachment.html -------------- next part --------------
A non-text attachment was scrubbed...
Name: ErrMsgConfig.zip
Type: application/zip
Size: 7995 bytes
Desc: not available
Url : http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20080924/3ef32ccd/attachment.zip

Reply by email

mitya boyarintsev
to mitya boyarintsev

Sorry! the sources contained a few minor bugs (deleting 2 last characters of messages, and no result value for the function)!
fixed in this version, is here.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20080925/9f1b127d/attachment-0001.html -------------- next part --------------
A non-text attachment was scrubbed...
Name: ErrMsgConfig.zip
Type: application/zip
Size: 7906 bytes
Desc: not available
Url : http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20080925/9f1b127d/attachment-0001.zip

Reply by email