caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Shishir Ramam <sramam@gmail.com>
To: caml list <caml-list@inria.fr>
Subject: [Caml-list] CamlIdl possible issue
Date: Mon, 16 Aug 2004 12:46:11 -0700	[thread overview]
Message-ID: <83f5996804081612462c7d239b@mail.gmail.com> (raw)

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


             reply	other threads:[~2004-08-16 19:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-16 19:46 Shishir Ramam [this message]
2004-08-16 21:28 ` Matthieu Dubuget
2004-08-16 23:04   ` Shishir Ramam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83f5996804081612462c7d239b@mail.gmail.com \
    --to=sramam@gmail.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).