Header include order

E

E. Robert Tisdale

Alex said:
I don't need to. From the output I posted earlier

/usr/include/stdlib.h:106: warning: parameter names <...>

...you can clearly see the path.
This is indeed the file with the Sun copyright you see above.

I found this same copyright notice in 88 header files
in the implementation distributed with version 3.2 of gcc.
Regardless of origin, your stdlib.h header file
is almost certainly part of the GNU C implementation
distributed with gcc.
Yes. I said:


You said:


It doesn't have to be. It *could* be defined in stdlib.h.

I never said differently.
But the fact that size_t *could* be defined in stdlib.h itself
does *not* mean that size_t *is* defined in stdlib.h itself.
Which, I thought, was pretty obvious. However,
you went out on a tangent, trying to make me prove that
there is indeed an implementation
where size_t is defined in stdlib.h.
Such proof is inherently irrelevant!

It is *not* irrelevant to your claim
that you have found an implementation
where size_t is actually defined in stdlib.h itself.
Are you prepared to concede that you were wrong?
If you are aware of the fact that there *can* be an implementation
where size_t is defined in stdlib.h, why are you arguing?

I assume that you agree that since the ANSI/ISO C standards
do not specify that size_t is defined in stdlib.h itself
and not in any included header file, all implementations
*could* define size_t in a header file included by stdlib.h.
My assertion is simply that, in fact, all implementations
*do* define size_t in a header file included by stdlib.h.
All you need to do to disprove my assertion is to provide
one example of an implementation that actually defines size_t
in stdlib.h itself.
Are you going to write code to depend on that fact (I wonder how...)
until I find you an implementation where it would fail? Which I did.

No. You haven't demonstrated that
size_t is actually defined in stdlib.h itself.
You claimed that stdlib.h includes another header to define size_t.
I pointed out that it was speculation on your part
since the standard does not define it.

And I have pointed out that the ANSI/ISO C standards are irrelevant
to the question of whether or not size_t is defined in a header file
included by stdlib.h.
You are just ignorant of all the other considerations,
besides the standard, that go into an implementation.
For example, size_t is useful at a much lower level than stdlib.h
in most implementations so it is *always* defined
in a lower level header file included in stdlib.h.
That is *my* point. Again, you said that stdlib.h
includes a header to define size_t. I pointed out
that it doesn't have to, according to the standard.

And I never argued this point. I only asserted that
size_t was actually defined in a header file included by stdlib.h.
The absence of even one contradictory example supports my assertion.
 
A

Alex

And I never argued this point. I only asserted that
size_t was actually defined in a header file included by stdlib.h.
The absence of even one contradictory example supports my assertion.

You are obviously trolling. I resign from this discussion.

Alex
 
M

Mark Gordon

I found this same copyright notice in 88 header files
in the implementation distributed with version 3.2 of gcc.
Regardless of origin, your stdlib.h header file
is almost certainly part of the GNU C implementation
distributed with gcc.

Since according to you the GCC headers are copyright Sun, perhaps you
will accept a header copyright IBM that was distributed with either AIC
or the AIX compiler?

/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
/* bos43V src/bos/usr/include/stdlib.h 1.31.6.2 */
/* */
/* Licensed Materials - Property of IBM */
/* */
/* (C) COPYRIGHT International Business Machines Corp. 1985,1995 */

....


#ifndef _H_STANDARDS
#include <standards.h>
#endif

The above is the only file included by this header, and is does not
define SIZE_T not does it include anything else

#ifndef _SIZE_T
#define _SIZE_T
typedef unsigned long size_t;
#endif

So with the version of CC and headers that IBM provide size_t IS defined
in stdlib.h and NOT in a file included by it.

Obviously I can't post the include files in there entirety since they
are copyright, so you can either believe me, buy a copy of AIX and it's
development system, or call me a lier.
I never said differently.
But the fact that size_t *could* be defined in stdlib.h itself
does *not* mean that size_t *is* defined in stdlib.h itself.

You said "In a header included by stdlib.h" not "Possibly in a header
included by stdlib.h" so you have definitely been proved wrong. since on
AIX 4.3 it IS defined in stdlib.h and NOT in any headers included by
stdlib.h.
It is *not* irrelevant to your claim
that you have found an implementation
where size_t is actually defined in stdlib.h itself.
Are you prepared to concede that you were wrong?

Why should he when he is correct?
I assume that you agree that since the ANSI/ISO C standards
do not specify that size_t is defined in stdlib.h itself
and not in any included header file, all implementations
*could* define size_t in a header file included by stdlib.h.
My assertion is simply that, in fact, all implementations
*do* define size_t in a header file included by stdlib.h.

You are wrong, see above.
All you need to do to disprove my assertion is to provide
one example of an implementation that actually defines size_t
in stdlib.h itself.

Done. Although it looks to me like you already had an example.
No. You haven't demonstrated that
size_t is actually defined in stdlib.h itself.

It looked like it was defined there to me, it just had protection
against duplicate definitions so you could include all the headers that
define it which the standard allows you to do.
And I have pointed out that the ANSI/ISO C standards are irrelevant
to the question of whether or not size_t is defined in a header file
included by stdlib.h.
You are just ignorant of all the other considerations,
besides the standard, that go into an implementation.
For example, size_t is useful at a much lower level than stdlib.h
in most implementations so it is *always* defined
in a lower level header file included in stdlib.h.
WRONG


And I never argued this point. I only asserted that
size_t was actually defined in a header file included by stdlib.h.

You actually stated that it IS defined in a header included by stdlib.h
and you have done so even more clearly and explicitly in the post.
The absence of even one contradictory example supports my assertion.

Absence of proof is not proof of absence. Anyway, your original
assertion and fallacious statement of fact are disproved by the IBM
implementation.
 
E

E. Robert Tisdale

Mark said:
Since according to you the GCC headers are copyright Sun, perhaps you
will accept a header copyright IBM that was distributed with either AIC
or the AIX compiler?

/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
/* bos43V src/bos/usr/include/stdlib.h 1.31.6.2 */
/* */
/* Licensed Materials - Property of IBM */
/* */
/* (C) COPYRIGHT International Business Machines Corp. 1985,1995 */

...


#ifndef _H_STANDARDS
#include <standards.h>
#endif

The above is the only file included by this header, and is does not
define SIZE_T not does it include anything else

#ifndef _SIZE_T
#define _SIZE_T
typedef unsigned long size_t;
#endif

So with the version of CC and headers that IBM provide size_t IS defined
in stdlib.h and NOT in a file included by it.

Obviously I can't post the include files in there entirety since they
are copyright, so you can either believe me, buy a copy of AIX and it's
development system, or call me a lier.




You said "In a header included by stdlib.h" not "Possibly in a header
included by stdlib.h" so you have definitely been proved wrong. since on
AIX 4.3 it IS defined in stdlib.h and NOT in any headers included by
stdlib.h.

I stand corrected. I ammend my assertion to
"size_t is defined in a header file included by stdlib.h
except for the IBM AIC or AIX compiler."
 
R

Richard Heathfield

E. Robert Tisdale said:
CBFalconer wrote:
Evidently, your definition of a troll is anyone who disagrees with you.

No. I have disagreed with Chuck on many occasions, and yet he has never
called me a troll. Therefore, your statement is incorrect.
For you, it's just another epithet that you hurl at an opponent.

No. He just hurls it at trolls.
You resort to ad hominem attacks

Loads of people have tried reasoning with you. It never works, because you
blithely ignore almost every criticism people make. So in the end, lots of
people stopped bothering.

Now that we know you respond to cartoons, expect more cartoons.
when you have lost an argument
and have no valid argument to contribute to the discussion.

Oh, we have plenty of valid arguments, stretching back many years. When are
you planning to deal with those arguments?
The use of such an obviously fallacious argument shows contempt
for subscribers if you really expect to sway them with it.

It was a cartoon, not an argument. We've done the arguments already.
Or do you honestly believe that you are making a valid argument?

We've made loads. Google for almost any comp.lang.c thread containing the
word "Tisdale" for a whole bunch of reasons why you are wrong.
 
M

Mark Gordon

Mark Gordon wrote:
^^^ AIX

I stand corrected. I ammend my assertion to
"size_t is defined in a header file included by stdlib.h
except for the IBM AIC or AIX compiler."

How do you know there is no other implementation where size_t is not
defined in stdlib.h?

Just accept that you were wrong in your assertion
and that you are wrong to claim to know what every single
implementation of C does.
 
E

E. Robert Tisdale

Mark said:
How do you know that there is no other implementation
where size_t is not defined in stdlib.h?

How do you know that there *is* another implementation
where size_t is not defined in stdlib.h?
 
R

Richard Heathfield

E. Robert Tisdale said:
How do you know that there *is* another implementation
where size_t is not defined in stdlib.h?

And this kind of silly argument is /precisely/ why we go by What The
Standard Says.

The Standard, in this case, requires stdlib.h to declare the size_t type,
but neither forbids it from doing so, nor requires it to do so,
specifically by including some other header. Therefore, it is foolish for
us to write C code that relies either on the inclusion, or on the
non-inclusion, by stdlib.h of some other header for that declaration.
 
R

Randy Howard

[In reference to ERT]...
Loads of people have tried reasoning with you. It never works, because you
blithely ignore almost every criticism people make. So in the end, lots of
people stopped bothering.

Now that we know you respond to cartoons, expect more cartoons.

Seems as if a new c.l.c convention is needed for the Uber-Troll (to still
a Tom St. Denis-ism). Perhaps something on the order of

<CARTOON>
Insert a response to one of ERT's inane postings...
</CARTOON>

This would allow everyone else to immediately grasp the intent of the
posting.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,997
Messages
2,570,241
Members
46,831
Latest member
RusselWill

Latest Threads

Top