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 VAA24292; Mon, 16 Aug 2004 21:46:14 +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 VAA24779 for ; Mon, 16 Aug 2004 21:46:13 +0200 (MET DST) Received: from mproxy.gmail.com (rproxy.gmail.com [64.233.170.201]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i7GJkCRM003053 for ; Mon, 16 Aug 2004 21:46:12 +0200 Received: by mproxy.gmail.com with SMTP id 77so84812rnl for ; Mon, 16 Aug 2004 12:46:11 -0700 (PDT) Received: by 10.38.79.70 with SMTP id c70mr63827rnb; Mon, 16 Aug 2004 12:46:11 -0700 (PDT) Message-ID: <83f5996804081612462c7d239b@mail.gmail.com> Date: Mon, 16 Aug 2004 12:46:11 -0700 From: Shishir Ramam Reply-To: Shishir Ramam To: caml list Subject: [Caml-list] CamlIdl possible issue Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 41210F04.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; 3.07:01 implemented:01 struct:01 struct:01 midl:01 midl:01 bug:01 compiler:01 ifdef:01 ocaml:01 ocaml:01 camlidl:01 camlidl:01 imho:01 int:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi, I am trying to use CamlIdl (Ocaml 3.07+2 win32) and have this case in which I understand what is happening, not sure why it has been implemented thus. For the following structure, when SOME_VAR is *not* defined, --- struct my_test { int x; #ifdef SOME_VAR int y; #endif }; --- CamlIdl converts this to --- let my_test = int --- This is because a structure with one element is getting special attention in Struct.ml_declaration. Knowing very little about the MIDL specification, I attempted to run this against a MIDL compiler for the following result - --- struct my_test { int x; }; --- It seems that the special casing of the single element is not the best of things for my application, since any reference to the element x will have to be modified in the Ocaml program depending on whether SOME_VAR is defined or not. IMHO this seems like a bug. Was wondering if there is some other explanation for this. Thanks in advance for any help. -shishir ------------------- 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