, after last value in a enum definition

6 views
Skip to first unread message

Erling D. Andersen

unread,
Aug 10, 2017, 6:34:48 AM8/10/17
to blis-discuss
Hi

I get a number of warnings like

\\fredericia\public\linux\64-x86\blis\amd\0.9.11\include\blis\bli_type_defs.h(431): warning #271: trailing comma is nonstandard
BLIS_DT_HI = BLIS_DCOMPLEX,


When I look into the code I see

{
BLIS_FLOAT = BLIS_BITVAL_FLOAT_TYPE,
BLIS_DOUBLE = BLIS_BITVAL_DOUBLE_TYPE,
BLIS_SCOMPLEX = BLIS_BITVAL_SCOMPLEX_TYPE,
BLIS_DCOMPLEX = BLIS_BITVAL_DCOMPLEX_TYPE,
BLIS_INT = BLIS_BITVAL_INT_TYPE,
BLIS_CONSTANT = BLIS_BITVAL_CONST_TYPE,
BLIS_DT_LO = BLIS_FLOAT,
BLIS_DT_HI = BLIS_DCOMPLEX,
} num_t;

typedef enum
{
BLIS_REAL = BLIS_BITVAL_REAL,
BLIS_COMPLEX = BLIS_BITVAL_COMPLEX
} dom_t;


Sometimes you put a , after the last enum and sometimes you do not. I suggest being consistent about dropping it.


^

Devin Matthews

unread,
Aug 10, 2017, 9:05:37 AM8/10/17
to blis-d...@googlegroups.com
Which compiler and configuration are you using? Trailing comma in an enum is allowed in standard C99 (and C++11 for that matter). Style is another question, though.

Devin Matthews

Field G. Van Zee

unread,
Aug 10, 2017, 5:26:58 PM8/10/17
to blis-d...@googlegroups.com
Erling,

Thanks for pointing this out. The trailing commas have been removed from
bli_type_defs.h in f86ce54d.

Field
> --
> You received this message because you are subscribed to the Google
> Groups "blis-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to blis-discuss...@googlegroups.com
> <mailto:blis-discuss...@googlegroups.com>.
> To post to this group, send email to blis-d...@googlegroups.com
> <mailto:blis-d...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/blis-discuss.
> For more options, visit https://groups.google.com/d/optout.

Erling D. Andersen

unread,
Aug 11, 2017, 4:11:52 AM8/11/17
to blis-discuss
Wauuu. That was fast.

It was Intel C 16 issuing those warnings.

Reply all
Reply to author
Forward
0 new messages