DragonFly BSD
DragonFly submit List (threaded) for 2004-01
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: patch to un-K&R-ify libkern


From: Dave Cuthbert <dacut@xxxxxxxxxxxxx>
Date: Tue, 27 Jan 2004 19:29:30 -0500

Joerg Sonnenberger wrote:
Both also issue a diagnostic (gcc error, SunPro warning) about:

   void x(int);
   void x() { return; }


This is simply invalid ;-) SunPro is broken or at least not a conforming
compiler for accepting this code.

Heh... well, the standards only require a diagnostic, which can range from printing "No!" to a teletype in Antarctica to setting your kitchen on fire. Such implementations are still conforming, though not terribly useful. :-)

This is also a good example of why arguments about standards compliance
are silly...


Anyway, the actual SunPro diagnostic looks like: "v.c", line 4: warning: identifier redeclared: x current : function() returning void previous: function(...) returning void : "v.c", line 1


I presume that this isn't an error because a system header, once upon a time, probably declared a function improperly. Wouldn't be the first time it's happened on SunOS. Anyway, bombing out and refusing to generate an object file would be disasterous, especially if you don't have root access on said machine.

Dave




[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]