#2721: Cactus does not detect `gettimeofday` timer
Reporter:Erik Schnetter
Status:open
Milestone:
Version:
Type:bug
Priority:major
Component:

Comment (by Roland Haas):

The global variable declaration I don’t buy. Since those look like:

extern int errno

whether they are in the function or not does not matter (and the extern is required for the declaration otherwise it would be a repeated definition each time the header file is included). Same with function prototypes:

int printf(fmt, ...);

is valid inside of main. Inline function definitions being forbidden seems correct, yes, those cannot be nested in main.

It is, in any case, bad practise to have the header includes in main, even if it may have been allowable at one point in C’s history.

Would it be ok to apply this after the release unless there is urgent need to have this fixed right now?

--
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/2721/cactus-does-not-detect-gettimeofday-timer