cpp-cheat/c/identifier_list.c
2016-04-01 12:26:26 +02:00

27 lines
470 B
C

/*
# Identifier list function declarator
Old style thing that should never be done today.
*/
#include "common.h"
/* TODO without definition. Should never be done. Conforming or not? */
/*int f(x, y);*/
int f(x, y)
int x;
int y;
{ return x + y; }
/* Also identifier list: it is the only optional one. */
void g() {}
/* Identifier type list. This one is not optional. */
void h(void) {}
int main() {
assert(f(1, 2) == 3);
return EXIT_SUCCESS;
}