ridiculousfish / cdecl-blocks

The venerable cdecl, with Apple blocks support
977 stars 75 forks source link

bad character '-' #2

Closed corburn closed 7 years ago

corburn commented 7 years ago
// syntax error
#define TCP_SKB_CB(__skb) ((struct tcp_skb_cb *)&((__skb)->cb[0]))

// bad character '-'
((struct tcp_skb_cb *)&((__skb)->cb[0]))

The above snippet was copied from Understanding Linux Network Internals. It is a type cast for writing data to a socket buffer control buffer.

ridiculousfish commented 7 years ago

Do I understand that you pasted this into cdecl and got the above error? cdecl understands C declarations, but not preprocessor defines or other C constructs. In this case it's erroring on the -> operator.

corburn commented 7 years ago

Yes, I incorrectly assumed it should understand these.