Advertisement
Advertisement
β‘ Community Insights
Discussion Sentiment
40% Positive
Analyzed from 344 words in the discussion.
Trending Topics
#function#register#post#used#declaration#don#itanium#didn#chen#probably
Discussion Sentiment
Analyzed from 344 words in the discussion.
Trending Topics
Discussion (15 Comments)Read Original on HackerNews
Homer nods.
Kids these days!
You can write a function declaration that's inconsistent with its definition in another translation unit. Declaring the function in a shared header file avoids this.
You can use an old-style declaration that doesn't specify what parameters a function expects. Don't do that. Use prototypes.
You can use a cast to convert a function pointer to an incompatible type, and call through the resulting pointer. Don't do that.
You can call a function with no visible declaration if your compiler overly permissive or is operating in pre-C99 mode. Don't do that.
Itanium? Stone age
Itanic had variable-sized register windows, plus extra tag bits for NaT ("not a thing") placeholder values. If you didn't set one of the argument registers the callee might trap in unexpected ways when it touches the register garbage.