Skip to content

Commit

Permalink
Ansi C Police
Browse files Browse the repository at this point in the history
fftw is supposed to compile with c89/c90.  Restore this property
so that I can test with gcc -ansi.

This change may seem needlessly reactionary, but in the last release I
accidentally inserted an assertion before a declaration and I broke
the Visual Studio build, so we must be careful not to use C99
constructs.

There are a few non-ANSI function calls in tests, e.g. isnan(),
drand48(), snprintf().  Since nobody has complained about those in
years, I am leaving them alone.
  • Loading branch information
matteo-frigo committed Jan 15, 2017
1 parent 50dacda commit fc3ada6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/cycle.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ typedef unsigned long long ticks;
static __inline__ ticks getticks(void)
{
unsigned a, d;
asm volatile("rdtsc" : "=a" (a), "=d" (d));
__asm__ __volatile__ ("rdtsc" : "=a" (a), "=d" (d));
return ((ticks)a) | (((ticks)d) << 32);
}

Expand Down

0 comments on commit fc3ada6

Please sign in to comment.