From: SourceForge.net <no...@so...> - 2009-11-14 22:50:21
|
Bugs item #1773186, was opened at 2007-08-13 16:31 Message generated for change (Comment added) made by wsfulton You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101645&aid=1773186&group_id=1645 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: parsing Group: None >Status: Closed >Resolution: Invalid Priority: 5 Private: No Submitted By: James Bigler (bigler) Assigned to: Marcelo Matus (marcelomatus) Summary: warnfilter for nested unions broken Initial Comment: I have a class that looks like this in an interface file for testing purposes: class MyNode { public: union { int leftOffset; // Always even. Right child offset is leftOffset+1; unsigned int listBegin; }; union { float split; // internal int listLen; // leaf }; unsigned char type; // 0=x,1=y,z=2,leaf=3 int size; // DEBUG ONLY!!! }; This issues a warning (as it should): Warning(312): Nested union not currently supported (ignored). That's fine. I wanted to turn off the warning for the class: %warnfilter(312) MyNode; class MyNode { ... }; This doesn't work. It still issues the warning. If I use a #pragma nowarn(312) it turns off, but I wanted to turn it off for just the class I know doesn't matter. According to William Fulton this is a bug due to the lack of nested classes. See message thread: http://sourceforge.net/mailarchive/forum.php?thread_name=469D05E2.9070104%40cs.utah.edu&forum_name=swig-user James ---------------------------------------------------------------------- >Comment By: William Fulton (wsfulton) Date: 2009-11-14 22:50 Message: Support has been just been added to suppress warnings for named classes. Suppressing the warning for something which has no name is not possible.... your unions are unnamed. If there were named, eg: class MyNode { public: union UU { int leftOffset; // Always even. Right child offset is leftOffset+1; unsigned int listBegin; }; }; Then you can suppress it now using: %warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) MyNode::UU; but for unnamed unions, the pragma is required or a command line option. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101645&aid=1773186&group_id=1645 |