[vtkusers] small bug report, extra comma in enum
Trevor Irons
trevorirons at gmail.com
Fri Aug 17 23:38:03 EDT 2012
arguably the email was more work...
I know it's now a big deal, but I like compiling with pedantic and I'm
always hit with this. Although it's the *only* warning I see (though not
very comprehensive coverage) in VTK. So good on all the VTK developers.
Thanks.
-- Trevor
On 18 August 2012 03:29, David Gobbi <david.gobbi at gmail.com> wrote:
> On Fri, Aug 17, 2012 at 8:23 PM, John Drescher <drescherjm at gmail.com>
> wrote:
> > On Fri, Aug 17, 2012 at 10:19 PM, Trevor Irons <trevorirons at gmail.com>
> wrote:
> >> When I compile using gcc on pedantic I've been bothered by a warning for
> >> years. Was hoping someone with commit access could spend about 12
> seconds
> >> and fix this.
> >>
> >> The warning reads
> >> In file included from external/matplot/matplot.h:40:0,
> >> from
> >> /home/tirons/src/Merlin/include/snmrinversion1damp.h:45,
> >> from
> >> /home/tirons/src/Merlin/unittest/utsnmrinversion1dgmrsimul.cpp:40:
> >> /usr/local/include/vtk-6.0/vtkXYPlotActor.h:395:28: warning: comma at
> end of
> >> enumerator list [-pedantic]
> >>
> >> In vtkXYPlotActor.h line 395 there is an extra comma :
> >>
> >> enum Alignment {
> >> AlignLeft = 0x1,
> >> AlignRight = 0x2,
> >> AlignHCenter = 0x4,
> >> AlignTop = 0x10,
> >> AlignBottom = 0x20,
> >> AlignVCenter = 0x40,
> >> AlignAxisLeft = 0x100,
> >> AlignAxisRight = 0x200,
> >> AlignAxisHCenter = 0x400,
> >> AlignAxisTop = 0x1000,
> >> AlignAxisBottom = 0x2000,
> >> AlignAxisVCenter = 0x4000, <-- Extra comma right here
> >> };
> >>
> >> I would really appreciate it if someone with commit privileges could
> remove
> >> this.
> >>
> >
> > Isn't that legal in c++? I intentionally make my enums that way..
>
> It was illegal until C++11, though compilers have been lax about it.
> So, yes, the extra comma should be removed but I've already
> spent more than 12 seconds just typing this email...
>
> Trailing commas in initializer lists have always been legal, though.
>
> - David
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120818/1abe8e90/attachment.htm>
More information about the vtkusers
mailing list