Sign in Join

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

Mailing lists / fpc-pascal / 2012-11

fpc: -vm switch

9 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

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

Jonas Maebe
to Bart
Bart wrote
Related to http://bugs.freepascal.org/view.php?id=23347 Using fpc 2.6.0 Does 2.6.0 handle -vm switch, and how is it used?

As it is described on the fpc help page (fpc -h, or fpc without any parameters)

Show quoted text 6 lines
In related bug http://bugs.freepascal.org/view.php?id=15872 Jonas wrote (long time ago): -vm<x>,<y> : Don't show messages numbered <x> and <y> Does this still apply?

Yes, and the fpc help page also still says so. The first release that supported it was 2.4.0. There never was any -vm switch that meant "show macros".

Jonas

Reply by email

Bart
to Jonas Maebe
Jonas Maebe wrote 5 lines
> Using fpc 2.6.0 > Does 2.6.0 handle -vm switch, and how is it used? As it is described on the fpc help page (fpc -h, or fpc without any parameters)

Am I missing something?

fpc -h gives (formatted the layout a little bit):

-v<x> Be verbose. <x> is a combination of the following letters: e : Show errors (default)
0 : Show nothing (except errors)
w : Show warnings
u : Show unit info
n : Show notes
t : Show tried/used files
h : Show hints
c : Show conditionals
i : Show general info
d : Show debug info
l : Show linenumbers
r : Rhide/GCC compatibility mode
s : Show time stamps
q : Show message numbers
a : Show everything
x : Executable info (Win32 only)
b : Write file names messages
p : Write tree.log with parse tree with full path
v : Write fpcdebug.txt with lots of debugging info

I don't see "m" in this list.

Show quoted text 7 lines
> -vm<x>,<y> : Don't show messages numbered <x> and <y> > > Does this still apply? Yes, and the fpc help page also still says so. The first release that supported it was 2.4.0. There never was any -vm switch that meant "show macros".

Adding any charcater/number after -vm gives an errormessage here (still with 2.6.0).
Can you give me a working example?
(I cannot access ftp://ftp.freepascal.org/pub/fpc/docs-pdf/chart.pdf currenly, it gives a time-out)

Bart

Reply by email

Jonas Maebe
to Bart
Bart wrote 5 lines
Am I missing something? fpc -h gives (formatted the layout a little bit): -v<x> Be verbose. <x> is a combination of the following letters:

[snip]

v : Write fpcdebug.txt with lots of debugging info I don't see "m" in this list.

It's just below that table:

-v<x> Be verbose. <x> is a combination of the following letters: e : Show errors (default) 0 : Show nothing (except errors) w : Show warnings u : Show unit info n : Show notes t : Show tried/used files h : Show hints c : Show conditionals i : Show general info d : Show debug info l : Show linenumbers r : Rhide/GCC compatibility mode s : Show time stamps q : Show message numbers a : Show everything x : Executable info (Win32 only) b : Write file names messages p : Write tree.log with parse tree
with full path v : Write fpcdebug.txt with lots of debugging info
m<x>,<y> : Don't show messages numbered <x> and <y>

Adding any charcater/number after -vm gives an errormessage here (still with 2.6.0). Can you give me a working example?

$ fpc -vw x.pp y.pp
Warning: Only one source file supported, changing source file to compile from "x.pp" into "y.pp"
Target OS: Darwin for PowerPC
Compiling y.pp
Fatal: Can't open file "y.pp"
Fatal: Compilation aborted
Error: /usr/local/bin/ppcppc returned an error exitcode (normal if you did not specify a source file to be compiled)

-> remove the warning at the start:

$ fpc -vw x.pp y.pp -vm11001
Target OS: Darwin for PowerPC
Compiling y.pp
Fatal: Can't open file "y.pp"
Fatal: Compilation aborted
Error: /usr/local/bin/ppcppc returned an error exitcode (normal if you did not specify a source file to be compiled)

To find out the message number of a particular message, compile with - vq. And you can only suppress warnings/notes/hints with that switch.

Jonas

Reply by email

Tomas Hajny
to Bart: Am I missing something? fpc -h gives (formatted the layout a little bit): -v<x> Be…
Bart wrote 9 lines
On 11/18/12, Jonas Maebe wrote: >> Using fpc 2.6.0 >> Does 2.6.0 handle -vm switch, and how is it used? > > As it is described on the fpc help page (fpc -h, or fpc without any > parameters) Am I missing something?

Yes, the last line. ;-)

Show quoted text 24 lines
fpc -h gives (formatted the layout a little bit): -v<x> Be verbose. <x> is a combination of the following letters: e : Show errors (default) 0 : Show nothing (except errors) w : Show warnings u : Show unit info n : Show notes t : Show tried/used files h : Show hints c : Show conditionals i : Show general info d : Show debug info l : Show linenumbers r : Rhide/GCC compatibility mode s : Show time stamps q : Show message numbers a : Show everything x : Executable info (Win32 only) b : Write file names messages p : Write tree.log with parse tree with full path v : Write fpcdebug.txt with lots of debugging info I don't see "m" in this list.

I do:
---
-v<x> Be verbose. <x> is a combination of the following letters: e : Show errors (default) 0 : Show nothing (except errors) w : Show warnings u : Show unit info n : Show notes t : Show tried/used files h : Show hints c : Show conditionals i : Show general info d : Show debug info l : Show linenumbers r : Rhide/GCC compatibility mode s : Show time stamps q : Show message numbers a : Show everything x : Executable info (Win32 only) b : Write file names messages p : Write tree.log with parse tree with full path v : Write fpcdebug.txt with lots of debugging info
m<x>,<y> : Don't show messages numbered <x> and <y> ===

Adding any charcater/number after -vm gives an errormessage here (still with 2.6.0). Can you give me a working example?
test.pas:
---
var
 C: cardinal;
begin
 C := 1;
 WriteLn (-1 + C);
end.
===

fpc -vwh test.pas

fpc -vwh -vm4035 test.pas

Tomas

Reply by email

Mark Morgan Lloyd
to Jonas Maebe: [snip] It's just below that table: -v<x> Be verbose. <x> is a combination of the…
Jonas Maebe wrote
To find out the message number of a particular message, compile with -vq. And you can only suppress warnings/notes/hints with that switch.

Noting somebody's recent comment about using -Xs- when building the compiler, that looks like another useful thing that people building from a snapshot or from subversion should be putting in.

make NOGDB=1 OPT='-O- -gl -Xs- -vq' all

Anything else?

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Tomas Hajny
to Mark Morgan Lloyd
Mark Morgan Lloyd wrote 12 lines
Jonas Maebe wrote: > To find out the message number of a particular message, compile with > -vq. And you can only suppress warnings/notes/hints with that switch. Noting somebody's recent comment about using -Xs- when building the compiler, that looks like another useful thing that people building from a snapshot or from subversion should be putting in. make NOGDB=1 OPT='-O- -gl -Xs- -vq' all Anything else?

Well, usefulness of various parameters always depends on your needs. I don't think that -vq is very useful or important (and especially not for building the compiler) unless you specifically look for disabling certain messages or automated parsing of compiler output.

Similarly, '-O- -gl -Xs-' are certainly not options to be always used for building the compiler unless you want to debug some problem in the compiler. Depending on your use case, users certainly may want to use snapshots with optimizations enabled.

'NOGDB=1' falls probably into a similar category - if you don't have the proper libgdb and are not interested in installing it (or it is not available for the particular platform), you need this parameter, otherwise there may not be many reasons for including it even when generating a snapshot.

I'm sure there are other parameters which may be very useful depending on the context (e.g. -vwih or even -va when solving compilation issues during snapshot generation, etc.)...

Tomas

Reply by email