Live data from Hacker News

C Gibberish to English

cdecl.org

1–10 of 54 posts

Re: C Gibberish to English

#3
Use typedef?

Granted, the function pointer syntax is forever confusing (to me anyway). The rest is easily tackled by naming things.

Even for function pointers, it’s just one lookup and then you can copy-paste the typedef for any other function pointer types in the project.

Re: C Gibberish to English

#6
post #3

Use typedef? Granted, the function pointer syntax is forever confusing (to me anyway). The rest is easily tackled by naming things. Even for function pointers, it’s just one lookup and then you can copy-paste the typedef for any other function pointer types in the project.

>Use typedef?

What if you're given somebody else's code and you need to understand it to put a typedef there

Re: C Gibberish to English

#7
Why is it that the first thing I try tends to uncover shortcomings?

typedef uint64_t qbb_t __attribute__((vector_size(sizeof(uint64_t) * 4)))

Syntax error

OK, its an extension, meh.

Re: C Gibberish to English

#9
post #3

Use typedef? Granted, the function pointer syntax is forever confusing (to me anyway). The rest is easily tackled by naming things. Even for function pointers, it’s just one lookup and then you can copy-paste the typedef for any other function pointer types in the project.

Reading C Type Declarations: http://unixwiz.net/techtips/reading-cdecl.html

(NOT the author. It simply helped me.)

Re: C Gibberish to English

#10
post #3

Use typedef? Granted, the function pointer syntax is forever confusing (to me anyway). The rest is easily tackled by naming things. Even for function pointers, it’s just one lookup and then you can copy-paste the typedef for any other function pointer types in the project.

>Use typedef? What if you're given somebody else's code and you need to understand it to put a typedef there

Welp, if it’s that bad then shrug and use a #define

(Yes, this is a joke)

Post reply on HN