This declaration in the file libpfm-4.8.0/lib/pfmlib_intel_rapl.c

   149    /*
   150     * number modifiers for RAPL
   151     * define an empty modifier to avoid firing the
   152     * sanity pfm_intel_x86_validate_table(). We are
   153     * using this function to avoid duplicating code.
   154     */
   155    static const pfmlib_attr_desc_t rapl_mods[]=
   *156    {};*

may be GNU-compatible, but it isn't standard C. By the description

   6.7.6.2 Array declarators

   Constraints

   1 In addition to optional type qualifiers and the keyword static,
   *the [ and ] may delimit**
   **an expression or *. If they delimit an expression (which specifies
   the size of an array), the**
   **expression shall have an integer type.* If the expression is a
   constant expression, it shall
   have a value greater than zero. The element type shall not be an
   incomplete or function
   type. The optional type qualifiers and the keyword static shall
   appear only in a
   declaration of a function

there has to be a non-empty expression, and in the construction

   6.7.9 Initialization

   Syntax

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

the initiializer-list can't resolve to an empty string.
With the PGI compiler, I can get the statement to compile by using

   static const pfmlib_attr_desc_t rapl_mods[]=
   {0,};

which qualifies as a non-empty list (and not merely a zero expression).
Can you add this (or equivalent) change to the code?


-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may 
contain
confidential information.  Any unauthorized review, use, disclosure or 
distribution
is prohibited.  If you are not the intended recipient, please contact the 
sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
perfmon2-devel mailing list
perfmon2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel

Reply via email to