[vtk-developers] warning for extra semicolon with vtkTypeMacro

Andy Bauer andy.bauer at kitware.com
Tue May 6 14:19:54 EDT 2014


Hi,

When using the GCC compilers with the -pedantic or the CUDA compilers
(probably others as well), there are a lot of warnings in VTK that there is
an extra semicolon at the end of the vtkTypeMacro. I'm hoping to get rid of
this warning but wanted to see if there are any good ideas on how to do
this beyond simple brute force. The main issue to me is that the macro is
defined in the header file so any codes that include the offending header
files will see this warning. There is potentially a bunch of them since
vtkObject.h itself has the unwanted semicolon in there.

Any good ideas on getting rid of this? For reference, the macro is:
// Macro used to determine whether a class is the same class or
// a subclass of the named class.
#define vtkTypeMacro(thisClass,superclass) \
  vtkAbstractTypeMacro(thisClass, superclass) \
  protected: \
  virtual vtkObjectBase *NewInstanceInternal() const \
  { \
    return thisClass::New(); \
  } \
  public:



Thanks,
Andy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtk-developers/attachments/20140506/578eccb5/attachment.html>


More information about the vtk-developers mailing list