1

When attempting to compile mpd with Sun Studio compiler:

"client.c", line 438: warning: implicit function declaration: typeof

I tracked down the offending lines of code, in dlist.h:

#define list_for_each_entry(pos, head, member)                          \
        for (pos = list_entry((head)->next, typeof(*pos), member);      \
             &pos->member != (head);    \
             pos = list_entry(pos->member.next, typeof(*pos), member))

According to typeof Wikipedia article, it's a GCC extension. Is there a typeof equivalent in Sun Studio, or a way to emulate it?

automaciej
  • 429
  • 3
  • 14

1 Answers1

3

This article says typeof is introduced in Sun Studio 12.

laalto
  • 150,114
  • 66
  • 286
  • 303