[xsd-users] Compile error on generated code with CXXFLAGS =
-pedantic
Boris Kolpackov
boris at codesynthesis.com
Tue Jan 9 15:57:28 EST 2007
Hi Jeroen,
Jeroen N. Witmond <jnw at xs4all.nl> writes:
> I like to compile all my c++ sources with g++ option -pedantic (together
> with -W -Wall). When used on generated code, this results in "error: ISO
> C++ does not support 'long long'" on these lines:
They should have called this option -anal ;-) for pretty much every
C++ compiler supports long long.
> I know I can hack around it by deleting these lines from the output of
> `xsd cxx-tree --generate-xml-schema schema.xsd` and using that everywhere
> else, but is there a better way to get around this?
No need to hack those lines: you can always provide custom definitions
for the types you don't like as described in the C++/Tree Mapping
Customization Guide[1]:
xsd cxx-tree --generate-xml-schema --custom-type long=64bit_t schema.xsd
Where 64bit_t is a 64-bit signed integer type of your choice.
hth,
-boris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 652 bytes
Desc: Digital signature
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20070109/2dbd7824/attachment.pgp
More information about the xsd-users
mailing list