------- 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

Reply via email to