* OCaml CVS: "Warning Z: unused variable loc" in camlp4-processed files.
@ 2004-11-13 23:23 Aleksey Nogin
2004-11-16 17:42 ` [Caml-list] " Michel Mauny
0 siblings, 1 reply; 3+ messages in thread
From: Aleksey Nogin @ 2004-11-13 23:23 UTC (permalink / raw)
To: Caml List
I am currently playing with OCaml 3.09+dev6 (2004-11-06) from CVS. I
really like the new "unused variable" warnings (already found couple of
minor bugs in our project while going over these warnings). However
there is one issue that I am not sure how to solve - all the
camlp4-processed files, the "EXTEND" directives end up causing a large
number of "unused variable loc" warnings. I could, of course, just turn
off the "Z" warning for the camlp4-preprocessed files, but this would,
obviously, shut up the meaningful warnings as well.
So I am wondering - are there any plans for addressing this for the 3.09
release? Thank you!
--
Aleksey Nogin
Home Page: http://nogin.org/
E-Mail: nogin@cs.caltech.edu (office), aleksey@nogin.org (personal)
Office: Jorgensen 70, tel: (626) 395-2907
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Caml-list] OCaml CVS: "Warning Z: unused variable loc" in camlp4-processed files.
2004-11-13 23:23 OCaml CVS: "Warning Z: unused variable loc" in camlp4-processed files Aleksey Nogin
@ 2004-11-16 17:42 ` Michel Mauny
2004-11-16 17:45 ` Michel Mauny
0 siblings, 1 reply; 3+ messages in thread
From: Michel Mauny @ 2004-11-16 17:42 UTC (permalink / raw)
To: Aleksey Nogin; +Cc: Caml List
Aleksey Nogin wrote/écrivait (Sat, Nov 13, 2004 at 03:23:49PM -0800):
> all the
> camlp4-processed files, the "EXTEND" directives end up causing a large
> number of "unused variable loc" warnings.
> So I am wondering - are there any plans for addressing this for the 3.09
> release? Thank you!
Yes: the default name for the location ident will become _loc
instead of loc. (Idents prefixed with a "_" won't be flagged as unused
even if they are.)
Existing programs using the "loc" identifier and willing to
keep it in 3.09, will have do something like:
stdpp.loc_name := "loc"
And those willing to prepare their code to 3.09 can try:
stdpp.loc_name := "_loc"
(This works in 3.08.)
Best,
-- Michel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Caml-list] OCaml CVS: "Warning Z: unused variable loc" in camlp4-processed files.
2004-11-16 17:42 ` [Caml-list] " Michel Mauny
@ 2004-11-16 17:45 ` Michel Mauny
0 siblings, 0 replies; 3+ messages in thread
From: Michel Mauny @ 2004-11-16 17:45 UTC (permalink / raw)
To: Aleksey Nogin; +Cc: Caml List
Michel Mauny wrote/écrivait (Tue, Nov 16, 2004 at 06:42:15PM +0100):
> Existing programs using the "loc" identifier and willing to
> keep it in 3.09, will have do something like:
>
> stdpp.loc_name := "loc"
>
> And those willing to prepare their code to 3.09 can try:
>
> stdpp.loc_name := "_loc"
>
> (This works in 3.08.)
I forgot to mention that you can do that with a camlp4 option:
$ camlp4 -help
Usage: camlp4 [load-options] [--] [other-options]
...
Other options:
...
-loc <name> Name of the location variable (default: loc)
-- Michel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-11-16 17:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-13 23:23 OCaml CVS: "Warning Z: unused variable loc" in camlp4-processed files Aleksey Nogin
2004-11-16 17:42 ` [Caml-list] " Michel Mauny
2004-11-16 17:45 ` Michel Mauny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox