head -r334128 broke the powerpc64 build

Mark Millard marklmi at yahoo.com
Fri May 25 00:55:11 UTC 2018



On 2018-May-23, at 11:21 PM, Mark Millard <marklmi at yahoo.com> wrote:

> [Eitan: . . . (not relevant, no longer CC'd)]
> 
> 
> https://ci.freebsd.org/job/FreeBSD-head-powerpc64-build/*/consoleText
> 
> For -r334131 (*=5551):
> 
> --- all_subdir_lib/libpmcstat ---
> cc1: warnings being treated as errors
> /usr/src/lib/libpmcstat/pmu-events/jevents.c:244: warning: missing initializer
> /usr/src/lib/libpmcstat/pmu-events/jevents.c:244: warning: (near initialization for 'unit_to_pmu[4].json')
> *** [pmu-events/jevents] Error code 1
> 
> make[5]: stopped in /usr/src/lib/libpmcstat
> 1 error
> 
> Note: This appears to be for the source:
> 
> 236	static struct map {
> 237	        const char *json;
> 238	        const char *perf;
> 239	} unit_to_pmu[] = {
> 240	        { "CBO", "uncore_cbox" },
> 241	        { "QPI LL", "uncore_qpi" },
> 242	        { "SBO", "uncore_sbox" },
> 243	        { "iMPH-U", "uncore_arb" },
> 244	        {}
> 245	};
> 
> It appears to object to the {} use.
> 

I looked up C99 in BS ISO/IEC 9899:1999 (with TC1) and
initializer-list always has at least one initializer and
the {}'s always contain an initializer list. So the
rejection of {} looks correct to me.

Syntax:

initializer:
  assignment-expression
  { initializer-list }
  { initializer-list , }

initializer-list:
   designation_opt initializer
   initializer-list , designation_opt initializer

So the build issue will likely return if/when -r334186
is reverted.

244 would probably have something like

{ NULL, NULL }

===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)



More information about the freebsd-ppc mailing list