Article View: comp.os.linux.development.apps
Article #7HELP-Conflicting types and casting float to NULL errors on GCC 2.7.0 Linux
From: Yusoff Y M
Date: Mon, 04 Dec 1995 18:09
Date: Mon, 04 Dec 1995 18:09
64 lines
2692 bytes
2692 bytes
Hi,
I need some help for two error messages that I get from GCC 2.7.0 on
Linux and if possible suggestions to get around them. These errors don't
occur on the Sun w/stations in school so any suggestions to get around the
errors would be welcome since that'll allow me to work on my Linux box at home.
The error messages that I give is approximate since I foolishly left the piece
of back-of-the-envelope paper that I wrote them on back home.
Right, here goes:
1st Case:
----------------
<#INCLUDEs, comments, bla, bla>
int printf();
int fprintf();
int fputc(char c, FILE *stream);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
<rest of program>
----------------
Compiler would say that conflicting type in function prototype; previously
declared in <stdio.h> which happened to be:
int __fputc(int, FILE *);
or something like that.
2nd. Case:
________________
<beginning of program....>
/* check for validity of entered arguments */
if ((b == (float)NULL) || (h == (float)NULL) || (r == (float)NULL)
^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^^^
|| (i == (int)NULL) || (C == (int)NULL))
usage();
<rest of program>
----------------
I really can't remember what the error message was but basically, it implied
that the compiler didn't allow casting NULL to float. So I can't check the
entered command line arguments.
That's it. Hope somebody can shed some light on my plight. It might actually
be something simple. But do point it out anyway since I'm quite new to C.
The first case is not my own code but my instructor's since I have to use some of
his code for the next assignment. The second case is part of my code. I really
stuck here because they actually compile on the Suns. Where's the fault lie then?
Thanks ever so much.
--
_______________________________________ _____________________________________
|Yusseri Md. Yusoff | |
|Dept. of Electronic Systems Engineering| AREA STILL UNDER |
|University of Essex | |
|Colchester CO4 3SQ | CONSTRUCTION |
|email:ymyuso@essex.ac.uk | |
|_______________________________________|_____________________________________|
Technical Details
Message-ID:
<49vdg5$fh3@seralph9.essex.ac.uk>Path:
arc1-ca.pugleaf.net!peer-news.britain.eu.net!seralph9!esl3!ymyusoShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!peer-news.britain.eu.net!seralph9!esl3!ymyuso From: ymyuso@esl3.NoSubdomain.NoDomain (Yusoff Y M) Newsgroups: comp.os.linux.development.apps,comp.lang.c,gnu.gcc.help Subject: HELP-Conflicting types and casting float to NULL errors on GCC 2.7.0 Linux Date: 4 Dec 1995 18:09:09 GMT Organization: Essex University, England Sender: ymyuso@esl3 (Yusoff Y M) Distribution: world Message-ID: <49vdg5$fh3@seralph9.essex.ac.uk> NNTP-Posting-Host: esl3