Last change
on this file since b797fe36 was
df699e0,
checked in by Peter A. Buhr <pabuhr@…>, 6 months ago
|
program updates to match text
|
-
Property mode set to
100644
|
File size:
514 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 | |
---|
11 | int 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-11 -Wall -Wextra -x c -" // |
---|
24 | // End: // |
---|
Note: See
TracBrowser
for help on using the repository browser.