This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/24068] Unconditional warning when using -combine


------- Additional Comments From dann at godzilla dot ics dot uci dot edu  2005-09-29 20:10 -------
(In reply to comment #9)
> Subject: Re:  Unconditional warning when using -combine
> 
> On Mon, Sep 26, 2005 at 08:46:20PM -0000, dann at godzilla dot ics dot uci dot
edu wrote:
> > > So this about the following:
> > > int f(a)
> > > int a;
> > > {
> > >   return a;
> > > }
> > > int f(int);
> > > 
> > > Which is questionable.
> > > 
> > > So I don't think this is not an inappropriate warning.
> > 
> > It seems that the warning was designed for code like your example above. 
> > But if you have 1 K&R file and one C90 file, then there should be no warning... 
> > Another bad thing is that if you swap the files on the command line then you get
> > no warning.
> 
> There certainly should be a warning.  It's not obvious on most targets
> with int, but what you're doing here won't work with float arguments;
> if the prototype includes an argument list, the definition should also.
> 

Sorry, I am not sure I understand what are you referring to... Both in the
original bug report and in Andrew's example above both the definition and the
prototype included an argument list with types for all the declarations.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24068


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]