Bug 65550
Summary: | gcc 2.96-110 does not perform implicit cast | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Peter Klotz <peter.klotz99> |
Component: | gcc | Assignee: | Jakub Jelinek <jakub> |
Status: | CLOSED WORKSFORME | QA Contact: | Brian Brock <bbrock> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.3 | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i386 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2002-05-27 18:12:15 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Peter Klotz
2002-05-27 14:30:23 UTC
Works for me just fine: gcc -W -Wall n.c n.c: In function `f': n.c:1: warning: unused parameter `i' gcc -v Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs gcc version 2.96 20000731 (Red Hat Linux 7.2 2.96-110) My guess is you used the g++ driver, in that case you really get that error: g++ -W -Wall n.c n.c: In function `void f (int *)': n.c:1: warning: unused parameter `int *i' n.c: In function `int main ()': n.c:6: cannot convert `void *' to `int *' for argument `1' to `f (int *)' but that's correct, C++ doesn't allow this and running g++ on a .c file compiles it as C++. You get similar error from gcc 3.1: g++3 -W -Wall n.c n.c: In function `void f(int*)': n.c:1: warning: unused parameter `int*i' n.c: In function `int main()': n.c:6: invalid conversion from `void*' to `int*' g++3 -v Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.1/specs Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --host=i386-redhat-linux --with-system-zlib Thread model: posix gcc version 3.1 20020525 (Red Hat Linux 7.3 3.1-3) You are absolutely right. For some reason /usr/bin/gcc was a softlink to /usr/bin/g++. After restoring gcc via rpm it worked. Sorry for the false bug report. |