Re: WARNING: FOO.c: enum pmc_event has too many values: 1930 > 1023

From: Benjamin Kaduk <kaduk_at_MIT.EDU>
Date: Sun, 12 Apr 2015 16:18:56 -0400 (EDT)
On Sat, 11 Apr 2015, Rui Paulo wrote:

> On Saturday 11 April 2015 15:53:41 Oliver Pinter wrote:
> > Hi all!
> >
> > I just found the line in the subject in our jenkinsbuild  log in both
> > amd64 and i386 case (we don't modified these files):
> >
> > http://nyi-01.build.hardenedbsd.org:8180/jenkins/job/HardenedBSD-master-i386
> > /56/console
> > http://nyi-01.build.hardenedbsd.org:8180/jenkins/job/HardenedBSD-master-amd
> > 64/58/consoleFull
> >
> > And more similar lines:
> >
> > WARNING: kern_pmc.c: enum pmc_event has too many values: 1930 > 1023
>
> This is a known problem.  PMC abuses enums and CTF can't cope with it.

Looking at the actual build log posted, the warning is emitted by cc, not
ctfconvert.

It is perfectly reasonable for a compiler to emit a warning when
encountering code that uses more than 1023 values in a single enumeration,
since C99 does not require a compiler to support more than that number of
enumeration constants in a single enum (section 5.2.4.1).  The warning
indicates that the code may not be portable, even if the current compiler
supports more than 1023 enumeration constants in an enumeration.

-Ben
Received on Sun Apr 12 2015 - 18:19:08 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:56 UTC