Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005570OCaml-for CamlIDL use 01:162012-04-03 16:13
Assigned To 
Platformx86_64OSWindowsOS Version7
Product Version 
Target VersionFixed in Version 
Summary0005570: CamlIDL does not accept 'unsigned' as an alias of 'unsigned int'
DescriptionI am unsure whether it is guaranteed by the C standard, but 'unsigned' is sometimes used as an alias for 'unsigned int'. See for instance <>. [^]

It does not seem to be straightforward to work around this when using CamlIDL to bind to an existing C library that uses these type aliases by generating .idl files from the existing .h files. CamlIDL itself rejects 'typedef unsigned int unsigned' and attempting '#define unsigned unsigned int' produces erroneous results for instances of e.g. 'unsigned long'. This seems to leave very complex sed scripts or reparsing the header files.
Steps To Reproduce$ cat foo.h
void f(unsigned);

$ cat foo.c
#include "foo.h"

void main(void) {
  unsigned x = 0;

void f(unsigned x) {

$ cl /nologo foo.c

$ camlidl foo.h
File foo.h, line 1, column 15: syntax error
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
xleroy (administrator)
2012-04-03 16:13

CamlIDL now lives its own life at [^] with its own bug tracker. It could use new developers to breathe some life into it. The issue you mention sounds like it would be easy to address by a small change to the parser.

- Issue History
Date Modified Username Field Change
2012-04-02 01:16 jjb New Issue
2012-04-03 16:13 xleroy Note Added: 0007272
2012-04-03 16:13 xleroy Status new => closed
2012-04-03 16:13 xleroy Resolution open => suspended
2017-02-16 14:37 xleroy Category CamlIDL => for CamlIDL use [^]
2017-02-23 16:43 doligez Category for CamlIDL use [^] => -for CamlIDL use [^]

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker