Invalid use of 'long'
Gaurav Tanna
tannagaurav@gmail.com
Fri Oct 29 00:33:00 GMT 2004
Hi all,
I am compiling a benchmark program (Health - Olden benchmarks). The
following is a code snippet. (Its not possible to give the complete
benchmark)
#include <stdio.h>
#include <stdlib.h>
#include "health.h"
#ifndef PLAIN
#include "mem-ref.h"
#include "future-cell.h"
#else
#define MIGRPH();
#endif
int dealwithargs(int argc, char *argv[]) {
/*MIGRPH();*/
if (argc < 5) {
fprintf(stderr, "usage: health <# levels> <time> <seed> <# proc>\n");
exit(1); }
max_level = atoi(argv[1]);
max_time = atol(argv[2]);
seed = atol(argv[3]);
__NumNodes = atoi(argv[4]);
}
I am getting following errors and I am not able to understand why.
Please can anyone help me out.
args.c: /usr/include/iso/stdio_iso.h:59: invalid use of `long'
args.c: /usr/include/stdlib.h:69: invalid use of `long'
args.c: /usr/include/stdlib.h:70: invalid use of `long'
args.c: /usr/include/stdlib.h:299: invalid use of `long'
args.c: /usr/include/stdlib.h:300: invalid use of `long'
args.c: /usr/include/stdlib.h:303: invalid use of `long'
args.c: /usr/include/stdlib.h:304: invalid use of `long'
args.c:25: undeclared identifier `__NumNodes'
*** Error code 1
make: Fatal error: Command failed for target `args.s'
Thanks very much in advance.
Gaurav Tanna
More information about the Gcc-help
mailing list