Hacker Newsnew | past | comments | ask | show | jobs | submit | rhambasan's commentslogin

OP here. This is not actually compliant with the C standard, just a gcc extension.

It is documented at [1] and according to the documentation, the code seems perfectly legal. However, calling it twice add5(2); add5(2);

leads to an "Illegal instruction. Core dumped"

Even stranger, calling it twice but with a different argument leads to a a segfault instead of illegal instruction: add5(5); add5(5);

[1] https://gcc.gnu.org/onlinedocs/gcc/Nested-Functions.html


That isn't strange. From the linked page:

>But this technique works only so long as the containing function (hack, in this example) does not exit.


b = $(".zero");

for (i = 0; i < 100000; i++) {

    b.click();

}


We, at KWARC, developed a search engine capable of searching arXiv, see [1]. It can search latex-style formulae and CMML formulae.

In addition, one can also use "query variables", which means that if I search for, e.g., "?a + ?a" (?a is a query variable), I will get all sums of two equal terms. ?a could be an integral, a fancy function, or just a one-letter variable.

[1] http://arxivsearch.mathweb.org


Do you have Javascript enabled?

(The page is running MathJax to convert MathML to HTML + CSS)


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: