gcc 2.7.2
Hi,
Please grant me a few moments of your time ...
I came unstuck while attempting to create an assignment to a declared pointer to
a function (type void). After much fiddling about I noticed that the error was incurred on
account of (any) of the args to the declared function being a float. I reproduce a fragment
of the code here, notice the difference in the second line of the function declaration args in
the two cases.
True the current version of gcc is 2.8.0, however I would feel really gutted, if I go
through the process of a get (6 diskettes), build, install ...
I would really appreciate you comments on this.
Regards
Jonathan Lawson
Script started on Mon Feb 2 13:52:35 1998
/////////////////////////////////////////////////////////////////
Hephzibah:/tmp/c-code/Mlink-v3$ cat test.c
void nothing (double *const last_check, double (*current_state)(),
double low_bnd, double (*per_centile_funct)(),double up_bnd,
char *dev_dnz,int (*switch_dev)(),char *dev_inz,int port)
{
}
void main ()
{
void (*funct)();
funct = nothing;
}
Hephzibah:/tmp/c-code/Mlink-v3$ gcc -c -ansi -v test.c
Reading specs from /usr/lib/gcc-lib/i486-linux/2.7.2/specs
gcc version 2.7.2
/usr/lib/gcc-lib/i486-linux/2.7.2/cpp -lang-c89 -v -undef -D__GNUC__=2 -D__GNUC_MINOR__=7
-trigraphs -$ -D__STRICT_ANSI__ -D__ELF__ -D__unix__ -D__i386__ -D__linux__ -D__unix
-D__i386 -D__linux -Asystem(unix) -Asystem(posix) -Acpu(i386) -Amachine(i386) -D__i486__
test.c /tmp/cca28495.i
GNU CPP version 2.7.2 (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
/usr/i486-linux/include
/usr/lib/gcc-lib/i486-linux/2.7.2/include
/usr/include
End of search list.
/usr/lib/gcc-lib/i486-linux/2.7.2/cc1 /tmp/cca28495.i -m486 -malign-loops=2 -malign-jumps=2
-malign-functions=2 -quiet -dumpbase test.c -ansi -version -o /tmp/cca28495.s
GNU C version 2.7.2 (i386 Linux/ELF) compiled by GNU C version 2.7.2.
/usr/i486-linux/bin/as -V -Qy -o test.o /tmp/cca28495.s
GNU assembler version 960425 (i486-linux), using BFD version 2.6.0.14
////////////////////////////End-of-First-Run/////////////////////////////////
Hephzibah:/tmp/c-code/Mlink-v3$ vi test.c
Edited the file to replace one double arg with a float arg ...
Hephzibah:/tmp/c-code/Mlink-v3$ !cat
///////////////////////////////////////////////////////////////////////////////////
cat test.c
void nothing (double *const last_check, double (*current_state)(),
float low_bnd, double (*per_centile_funct)(),double up_bnd,
char *dev_dnz,int (*switch_dev)(),char *dev_inz,int port)
{
}
void main ()
{
void (*funct)();
funct = nothing;
}
Hephzibah:/tmp/c-code/Mlink-v3$ !gcc
gcc -c -ansi -v test.c
Reading specs from /usr/lib/gcc-lib/i486-linux/2.7.2/specs
gcc version 2.7.2
/usr/lib/gcc-lib/i486-linux/2.7.2/cpp -lang-c89 -v -undef -D__GNUC__=2 -D__GNUC_MINOR__=7
-trigraphs -$ -D__STRICT_ANSI__ -D__ELF__ -D__unix__ -D__i386__ -D__linux__ -D__unix
-D__i386 -D__linux -Asystem(unix) -Asystem(posix) -Acpu(i386) -Amachine(i386) -D__i486__
test.c /tmp/cca28501.i
GNU CPP version 2.7.2 (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
/usr/i486-linux/include
/usr/lib/gcc-lib/i486-linux/2.7.2/include
/usr/include
End of search list.
/usr/lib/gcc-lib/i486-linux/2.7.2/cc1 /tmp/cca28501.i -m486 -malign-loops=2
-malign-jumps=2-malign-functions=2 -quiet -dumpbase test.c -ansi -version -o
/tmp/cca28501.s
GNU C version 2.7.2 (i386 Linux/ELF) compiled by GNU C version 2.7.2.
test.c: In function `main':
<<<-**////ErrorMessage////**<<<-
test.c:9: warning: assignment from incompatible pointer type
<<<-**////ErrorMessage////**<<<-
/usr/i486-linux/bin/as -V -Qy -o test.o /tmp/cca28501.s
GNU assembler version 960425 (i486-linux), using BFD version 2.6.0.14
Hephzibah:/tmp/c-code/Mlink-v3$ exit
exit
///////////////////////////End-of-final-run/////////////////////////////////////////////////
Script done on Mon Feb 2 13:53:44 1998
--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org .
Trouble? e-mail to templin@bucknell.edu .
Reply to: