This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/33219] Error in compiling when there is a function with a char parameter called before its declaration with inline parameters.
- From: "andreagrassi at sogeasoft dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Aug 2007 15:42:52 -0000
- Subject: [Bug c/33219] Error in compiling when there is a function with a char parameter called before its declaration with inline parameters.
- References: <bug-33219-15030@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from andreagrassi at sogeasoft dot com 2007-08-28 15:42 -------
Sorry I confirmed for mistake ... Continue the bug report...
The code is very simple and you can read it in the souce code a.c.
Command line of the compile is simple too: "gcc a.c".
*****************************
Error message:
"a.c:7: error: conflicting types for 'a'
a.c:7: note: an argument type that has a default promotion can't match an empty
parameter name list declaration
a.c:3: error: previous implicit declaration of 'a' was here
a.c: In function 'a':
a.c:8: warning: incompatible implicit declaration of built-in function
'printf'"
*****************************
Condition of the error:
1) Function with at least a parameter declared as "char".
2) Function called before its declaration
3) Inline parameter list declaration (that is with the types declared inside
the parenthesis.
In fact, If one of the previous conditions miss, the source is compiled with
success.
If for example, the declaration was "
a(a)
char a;
{
" the compiling works, whereas if I write "
a(char a)
" it fails.
--
andreagrassi at sogeasoft dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33219