whitequark,
@whitequark@mastodon.social avatar

this is the first time i encounter a C function returning a function without a typedef and ... no

niconiconi,

@whitequark signal() is probably the most famous C function signature of all time, many Unix coders know what it does even if they don't really know C pointer syntax because of its appearance in Unix folklore... sighandler_t is a GNU extension so the "proper" conforming code is the raw definition.

ankitpati,
@ankitpati@mastodon.social avatar

@whitequark How do you make it this far into LLVM with your innocence intact? This thing got me right when I started out in C, following the K&R book. That book has a full implementation of a C declaration to English translator.

niconiconi,

@ankitpati @whitequark cdecl is one of the tell-tales that shows K&R is a reference book instead of an introductory textbook. Instead of teaching readers about useful guidelines of reading C declarations, it just gives you the raw algorithm.

chandlerc,
@chandlerc@hachyderm.io avatar

@whitequark Returning and accepting a function pointer without a typedef. It's awesome.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • DreamBathrooms
  • everett
  • osvaldo12
  • magazineikmin
  • thenastyranch
  • rosin
  • normalnudes
  • Youngstown
  • Durango
  • slotface
  • ngwrru68w68
  • kavyap
  • mdbf
  • InstantRegret
  • JUstTest
  • ethstaker
  • GTA5RPClips
  • tacticalgear
  • Leos
  • anitta
  • modclub
  • khanakhh
  • cubers
  • cisconetworking
  • megavids
  • provamag3
  • tester
  • lostlight
  • All magazines