From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id RAA23828; Tue, 8 Jul 2003 17:38:47 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id RAA25842 for ; Tue, 8 Jul 2003 17:38:46 +0200 (MET DST) Received: from relay.rinet.ru (relay.rinet.ru [195.54.192.35]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h68Fcif15741; Tue, 8 Jul 2003 17:38:44 +0200 (MET DST) Received: from relay.rinet.ru (localhost [127.0.0.1]) by relay.rinet.ru (8.12.8p1/8.12.8) with ESMTP id h68FcgI2048585 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 8 Jul 2003 19:38:43 +0400 (MSD) (envelope-from dbely@mail.ru) Received: (from uucp@localhost) by relay.rinet.ru (8.12.8p1/8.12.8/Submit) with UUCP id h68Fcgvu048584; Tue, 8 Jul 2003 19:38:42 +0400 (MSD) (envelope-from dbely@mail.ru) Received: from rover1.stormoff (ROVER1) [192.168.0.50] by stormoff with esmtp (Exim 3.12 #1 (Debian)) id 19ZuY3-0002JJ-00; Tue, 08 Jul 2003 19:38:31 +0400 X-Comment-To: Xavier Leroy To: Xavier Leroy Cc: caml-list@inria.fr Subject: Re: [Caml-list] camlp4 References: <20030708153816.D19338@pauillac.inria.fr> From: Dmitry Bely Date: Tue, 08 Jul 2003 19:38:29 +0400 In-Reply-To: <20030708153816.D19338@pauillac.inria.fr> (Xavier Leroy's message of "Tue, 8 Jul 2003 15:38:16 +0200") Message-ID: User-Agent: Gnus/5.090008 (Oort Gnus v0.08) XEmacs/21.4 (Military Intelligence (RC5 Windows), i586-pc-win32) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 camlp:01 ocamlopt:01 -unsafe:01 -pp:01 notations:01 ocamlc:01 tuareg:01 eol:01 buffer:01 incorrectly:01 compiler:01 ocaml:01 dmitry:01 writes:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Xavier Leroy writes: >> Can two things live together? When I run ocamlopt -unsafe -pp >> "camlp4 ..." ..., compiler prints warning and -unsafe seems to be >> ignored. Am I doing something wrong? > > "-unsafe" is a parsing-time option: it governs how the .[] and .() > notations are parsed into applications of functions from the Array and > String modules. Hence, if you use camlp4 for parsing, you should pass > the -unsafe option to camlp4, not to ocamlc/ocamlopt. Ah, I see. thank you very much. There is another problem with camlp4. When it reports syntax error, it doesn't count the lines, say: File "test.ml", line 1, characters 12398-12401: <...> (line is always equal to 1, at least under Windows) I compile Ocaml sources within XEmacs/Win32/tuareg mode, and Emacs consider EOL in the buffer as ONE character, while camlp4 counts it as TWO chars. So the error place is pointed incorrectly. How do you think, where it could be fixed? (camlp4, tuareg,...)? - Dmitry Bely ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners