[xsde-users] Disabling warnings from generated code

Vrijnsen, Jeroen jeroen.vrijnsen at philips.com
Thu Jan 18 08:33:03 EST 2018


Hi Boris,


Thanks for the quick reply. I don't know what man-page you refer to, I looked at the 'xsde help cxx-hybrid' information. That does not list the 'key=*' option; it might be worthwhile to add this information.


When I know attempt to run with '--prologue-file key=* <path/to>/prologue.txt', I get the error "prologue.txt:1:1: error: invalid document structure".

The content of my prologue file (there is also a corresponding epilogue file):

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wshadow"


What format should the file adhere to?


Regards,

Jeroen

________________________________
From: Boris Kolpackov <boris at codesynthesis.com>
Sent: Thursday, January 18, 2018 12:10:40 PM
To: Vrijnsen, Jeroen
Cc: xsde-users at codesynthesis.com
Subject: Re: [xsde-users] Disabling warnings from generated code

Vrijnsen, Jeroen <jeroen.vrijnsen at philips.com> writes:

> Looking into the cxx-hybrid help, I seem to have the following options
> to achieve this: either
>
>     (1) use '--prologue-file <file>' and '--epilogue-file <file>',
>         to add a list of '#pragma ignore <warning>' statements, or

Yes, this is the way to do it.


>     (2) use the '--disable-warning <id>' option.

No, this options suppresses XSD/e compiler's own warnings, not warnings
to be issued by the C++ compiler.


>    (1) The prologue/epilogue file is added to the <XsdType>.cxx/hxx
>        files, but not to the '-pimpl' and '-pskel' files.

>From the man page:

--hxx-prologue text
  Insert text at the beginning of the header file.

  For the C++/Hybrid mapping, the text argument can be optionally prefixed
  with a file key in the form key=text. The valid values for key are pskel
  (parser skeleton files), pimpl (parser implementation files), sskel
  (serializer skeleton files), simpl (serializer implementation files), and *
  (all files). If key is empty or not present then the text is used for the
  object model files only.

Boris

________________________________
The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.


More information about the xsde-users mailing list