__stdcall alternative

K

Kenny McCormack

santosh said:
In fact the use of _stdcall would qualify as "platform specific"
according to Kenny's own definition of that term, since it's only ever
used, as far as I'm aware, on Windows and clones, a collection that can
be, for the present purposes, considered as one platform.

Anyone with an IQ over 3 can see that the term "Windows" represents
many, many, different platforms.

We realize that you don't qualify.
 
F

Flash Gordon

Keith Thompson wrote, On 25/04/08 17:23:
Sensei said:
Jacob, as a learner here I really do care about portable code, so I'd
be happy to know what is in the standard, what is specific to a
platform (or a set of), and finally what is implementation specific.
[...]

The latest (post-C99) draft of the standard is freely available at
<http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf>.

Drafts of the more widely supported C90 standard are slightly harder
to come by (I'm sure someone will post a URL or two in response to
this).

Ask and it shall be done...
http://clc-wiki.net/wiki/c_standard
It also has links to where you can find the rationales which say why
some of the C standard is the way it is.
But since C99 is very nearly a superset of C90 (dropping
implicit int was probably the biggest exception),

I would always have considered using an explicit int to be better style
anyway. Others may disagree, of course.
if a feature isn't
mentioned in n1256.pdf you can be reasonably sure that it's not in any
C standard.

True.

The most portable version of the C language is the common subset of C99
and C90.

Also Sensei should note that you normally have to supply extra options
to get any compiler to fully conform to the C standard, and sometimes
further options to make it warn/error on extensions (some will never
warn/error on every extension they support), and more options to get the
compiler to get a load more useful warnings.

In short, read the documentation and find out how to make your compiler
conform to the standard and warn about as much as possible.
 
F

Flash Gordon

Sensei wrote, On 26/04/08 13:30:
I was just pointing out that "common extension" is not enough to me,
__stdcall so isn't a viable option. Anyway I'm not posting much, but I
am learning a lot here!

My post was not intended as criticism, merely providing information
which you may or may not have known.
 

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,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top