source: doc/theses/mike_brooks_MMath/programs/bkgd-c-tyerr.c @ a885357

Last change on this file since a885357 was a885357, checked in by Peter A. Buhr <pabuhr@…>, 7 months ago

update compile commands

  • Property mode set to 100644
File size: 497 bytes
Line 
1#include <stdio.h>
2#include <assert.h>
3#include <stdlib.h>
4
5#ifdef ERRS
6#define ERR(...) __VA_ARGS__
7#else
8#define ERR(...)
9#endif
10
11int main() {
12        float * x;                      $\C{// x points at a floating-point number}$
13        void (*y)(void);        $\C{// y points at a function}$
14        @x = y;@                        $\C{// wrong}$
15        @y = x;@                        $\C{// wrong}$
16
17        float pi = 3.14;
18        void f( void (*g)(void) ) { g(); }
19        @f( &pi );@                     $\C{// wrong}$
20}
21
22// Local Variables: //
23// compile-command: "sed -f sedcmd bkgd-c-tyerr.c | gcc -x c -" //
24// End: //
Note: See TracBrowser for help on using the repository browser.