nested function support

  • Thread starter Robert Rodriguez
  • Start date
R

Robert Rodriguez

does anyone know if the ms c compiler has nested function support, I
have a large gcc project I need to merge into another ms c program.

Thanks in advance.
 
M

Mike Wahler

Robert Rodriguez said:
does anyone know if the ms c compiler has nested function support,

This newsgroup is not for discussing compilers. If you have
a question about a Microsoft product, ask in a group where
it's topical (see www.groups.google.com and/or www.usenet.org
to find which groups discuss which topics. Also, the MSDN
site ( www.msdn.microsoft.com ) provides a list of newsgroups
which discuss Microsoft products and technologies.
I
have a large gcc project I need to merge into another ms c program.

Note that ISO standard C (the topic here) does not have support
for nested functions. So any implementation that provides them
does so by adding them as extensions, not standard, not topical here.

Purpose of comp.lang.c:
http://www.angelfire.com/ms3/bchambless0/welcome_to_clc.html

C FAQ:
http://www.eskimo.com/~scs/C-faq/top.html

-Mike
 
M

Martin Ambuhl

Robert said:
does anyone know if the ms c compiler has nested function support, I
have a large gcc project I need to merge into another ms c program.

Nested functions are not part of C. gcc supports them for code in
"GNUC" when -std=gnu89 or -std=gnu99, but not for code written in
standard C when -std=c89 or -std=c99. Code using nested functions
should be rewritten to be in C.
 
C

CBFalconer

Robert said:
does anyone know if the ms c compiler has nested function support, I
have a large gcc project I need to merge into another ms c program.

The C language does not support nested (local) functions. The
closest you can come is to mark some functions as static in a
compilation unit.
 
M

Mabden

Robert Rodriguez said:
does anyone know if the ms c compiler has nested function support, I
have a large gcc project I need to merge into another ms c program.

"the ms c compiler"? When you find the right group to ask in, they will ask
you to specify which one you mean.
Thanks in advance.

No need, as I'm sure you'll just get a lot of "wrong group" replies.
 
S

SM Ryan

# Nested functions are not part of C.

Wrong. The correct answer is they are not part of ANSI C. They are part of gnu C. ANSI
doesn't have a trademark on the language name.
 
K

Keith Thompson

SM Ryan said:
# Nested functions are not part of C.

Wrong. The correct answer is they are not part of ANSI C. They are
part of gnu C. ANSI doesn't have a trademark on the language name.

Please use the conventional "> " prefix for quoted text.
Please keep your lines down to about 72 columns.
Please use the standard "-- " signature delimiter.

This newsgroup discusses C. The term "C", without qualification, is
understood to refer to the language defined by the ISO (or ANSI)
standard, either C90 or C99 (or one of the intermediate versions
defined by the Technical Corrigenda). GNU C is a different dialect,
based on C.

Think about it this way. If I were to say, "Nested functions *are*
part of C", would you think I was wrong, or would you assume that by
"C", I really meant "GNU C"?

No, the name "C" isn't trademarked. Neither is the name "English",
but if I invented a language that uses the Cyrillic alphabet and
called it "English", I'd still wrong if I claimed that "English uses
the Cyrillic alphabet.
 
S

SM Ryan

# This newsgroup discusses C. The term "C", without qualification, is
# understood to refer to the language defined by the ISO (or ANSI)

Your understanding. The newsgroup was created before the invention of ANSI C.

# Think about it this way. If I were to say, "Nested functions *are*
# part of C", would you think I was wrong, or would you assume that by
# "C", I really meant "GNU C"?

You could ensure no confusion by saying ANSI C if you mean ANSI C. Marty was
wrong in laying down absolute statements without the proper qualification.

As usual you want to whine if you don't like my responses, but you give a full pass
to sloppiness from fellow clique members. That's hypocrisy.
 
K

Keith Thompson

SM Ryan said:
# This newsgroup discusses C. The term "C", without qualification, is
# understood to refer to the language defined by the ISO (or ANSI)

Your understanding. The newsgroup was created before the invention of ANSI C.

Please use the conventional "> " prefix for quoted text.
Please keep your lines down to about 72 columns.
Please use the standard "-- " signature delimiter.

It's not difficult, and it would make things easier for you and for
everyone else. Why do you persist in ignoring good advice?

As for "C" referring to ANSI or ISO C, it's my understanding and the
implicit understanding of the vast majority of people who post here.
(We rarely discuss pre-ANSI C here; when we do, we generally label it
as such.) This newsgroup is, as you point out, very old (which is why
it doesn't have a formal charter). We have conventions that have
evolved over many years, and they serve us well. You can come in here
and tell us we've been doing it wrong all these years, but we're not
likely to pay much attention.
# Think about it this way. If I were to say, "Nested functions *are*
# part of C", would you think I was wrong, or would you assume that by
# "C", I really meant "GNU C"?

You could ensure no confusion by saying ANSI C if you mean ANSI
C. Marty was wrong in laying down absolute statements without the
proper qualification.

Qualification was not necessary, as everyone other than you seems to
understand. I don't believe anyone else was confused.
As usual you want to whine if you don't like my responses, but you
give a full pass to sloppiness from fellow clique members. That's
hypocrisy.

Not at all. Martin was right; you're wrong. Martin even clearly
stated the conditions under which gcc does or does not support nested
functions.

If you don't believe me, read the gcc documentation; it clearly refers
to its extra features as *extensions* to the C language, not as part
of the C language.

When people correct your errors, or just disagree with you, you
interpret it as whining. I suggest you re-think that.
 
M

Martin Ambuhl

SM Ryan wrote:

You could ensure no confusion by saying ANSI C if you mean ANSI C. Marty was
wrong in laying down absolute statements without the proper qualification.

WTF is Marty? I don't see her in this thread.
 

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

No members online now.

Forum statistics

Threads
474,146
Messages
2,570,832
Members
47,374
Latest member
anuragag27

Latest Threads

Top