[PyKDE] More on GCC 2.96
Jesper Eskilson
jojo at virtutech.se
Wed Oct 11 15:32:14 BST 2000
Phil Thompson <phil at river-bank.demon.co.uk> writes:
> Is it invalid C++ to assign something to a void * without a cast? (I
> know its invalid to do the reverse.)
I don't know about C++, but the following piece of C-code does not pass
"gcc -Wall -ansi -pedantic":
int func() {
}
int main() {
void *foo = func;
}
[0] palpatine:~ -> gcc -Wall -ansi -pedantic foo.c
foo.c: In function `func':
foo.c:3: warning: control reaches end of non-void function
foo.c: In function `main':
foo.c:6: warning: ANSI forbids initialization between function pointer and `void *'
foo.c:6: warning: unused variable `foo'
foo.c:8: warning: control reaches end of non-void function
/Jesper
--
-------------------------------------------------------------------------
Jesper Eskilson jojo at virtutech.se
Virtutech http://www.virtutech.se
-------------------------------------------------------------------------
More information about the PyQt
mailing list