Re: [gtk-list] Re: compiling gtk+ on solaris



Erik Mouw wrote:
> On Thu, 23 Dec 1999 15:43:07 +0100, Drazen Kacar wrote:

> >           c (conformance)
> >            Strictly conformant ANSI/ISO C, without K&R C compati-
> >            bility extensions.  The compiler will issue errors and
> >            warnings for programs that use non-ANSI/ISO C con-
> >            structs.
> 
> From my SunOS 4.1.3 days, I can't remember that the -Xc option was
> especially useful... Luckily we had gcc with -Wall. Maybe it changed with
> Solaris.

It's equally NotUseful, as X would put it. It's a standard way of being
non-standard. Since the current C standard says that `long long'
doesn't exist and that long is the largest integral type, a conforming
compiler must obey that, which is what I get with -Xc (maybe a few
other things, as well). OTOH, since it's hard to do anything these
days without `long long', the compiler has it in the default mode, ie.
without -Xc.

> >> Which is worse: X/Open not adding proper prototypes, or Sun not
> >> implementing a proper C compiler? :-)
> > 
> > Sun not adding proper prototypes. I'll have to find out why CC and lint
> > don't complain before concluding they didn't implement proper compilers
> > and filing a bug report.
> 
> I think that omitting the return type is valid in C, but invalid in C++.
> Therefore, lint is correct, and Sun CC is not.

Yes. I managed to confuse myself. I was trying not to write "functions
whose return type is not explicitely declared" three times in the
same sentence, so I only used undeclared, which, in the end, got me
utterly confused. Although I would expect warnings from lint in this
case. After all, it's supposed to be picky. But since there is no
standard for lint warnings, it's a bit hard to classify it as a bug.
I'll see what I can do about it.

I never tried to use C++, so I'd rather let someone else report bugs
for that language. :-)

> "The first thing we do, let's kill all the language lawyers." -- William
> Shakespeare, Henry IV, part II

To get rid of the competition? :-)

-- 
 .-.   .-.    I don't work for my employer.
(_  \ /  _)
     |        dave@srce.hr
     |        dave@fly.srk.fer.hr



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