Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Apr 2015 16:18:56 -0400 (EDT)
From:      Benjamin Kaduk <kaduk@MIT.EDU>
To:        Rui Paulo <rpaulo@me.com>
Cc:        freebsd-current@freebsd.org, current@freebsd.org, Oliver Pinter <oliver.pinter@hardenedbsd.org>
Subject:   Re: WARNING: FOO.c: enum pmc_event has too many values: 1930 > 1023
Message-ID:  <alpine.GSO.1.10.1504121612180.22210@multics.mit.edu>
In-Reply-To: <3993727.Uyr34jnAqW@akita>
References:  <CAPQ4ffsU9Nush7PogZDDxhi-wipxwxOZ6nUX3MKHoE1Ue_xjWg@mail.gmail.com> <3993727.Uyr34jnAqW@akita>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.GSO.1.10.1504121612180.22210>