public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* What versions of C standard does GCC support?
@ 2009-08-31 10:49 Tim
  2009-08-31 11:04 ` Tim Prince
  2009-08-31 15:09 ` What versions of C standard does GCC support? Marshall B. Rogers
  0 siblings, 2 replies; 4+ messages in thread
From: Tim @ 2009-08-31 10:49 UTC (permalink / raw)
  To: gcc-help

Hi,
 I am confused by reading http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Standards.html, which says "GCC supports three versions of the C standard". It seems says more than one versions. Can anyone clarify it? Which version is the most popular now and recommended?
Thanks and regards!


      

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: What versions of C standard does GCC support?
  2009-08-31 10:49 What versions of C standard does GCC support? Tim
@ 2009-08-31 11:04 ` Tim Prince
  2009-08-31 14:50   ` problems with TR1 distributions A. Lester Buck III
  2009-08-31 15:09 ` What versions of C standard does GCC support? Marshall B. Rogers
  1 sibling, 1 reply; 4+ messages in thread
From: Tim Prince @ 2009-08-31 11:04 UTC (permalink / raw)
  To: Tim; +Cc: gcc-help

Tim wrote:

>  I am confused by reading http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Standards.html, which says "GCC supports three versions of the C standard". It seems says more than one versions. Can anyone clarify it? Which version is the most popular now and recommended?
>
> 
>       
There's a version of this page for gcc-4.4.1, the current release. 
These pages attempt to explain how the -std= options may be used to 
select which standard is supported, entirely or partially.  Please be 
more specific if you are looking for further explanation.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* problems with TR1 distributions
  2009-08-31 11:04 ` Tim Prince
@ 2009-08-31 14:50   ` A. Lester Buck III
  0 siblings, 0 replies; 4+ messages in thread
From: A. Lester Buck III @ 2009-08-31 14:50 UTC (permalink / raw)
  To: gcc-help


I need to do some statistical work in C++, so I am trying to use
the TR1 extensions.  I am using g++ Debian 4.3.4-1.

To become familiar with the distributions, I found various example
code to run.  I get some of the samples to run, and others go off
into 100% cpu never to return.  (For the Debian implementation,
I have to change std::tr1:: to std::)

The following sample routines work as advertised except for
differences in expected output:

Linear Congruential
http://msdn.microsoft.com/en-us/library/bb981982.aspx
g++ output matches web page

Mersenne Twister
http://msdn.microsoft.com/en-us/library/bb982912.aspx
g++ output matches web page

Bernoulli Distribution
http://msdn.microsoft.com/en-us/library/bb981930.aspx
g++ output matches web page

Normal Distribution
http://msdn.microsoft.com/en-us/library/bb982450.aspx
g++ output DOES NOT match web page

Exponential Distribution
http://msdn.microsoft.com/en-us/library/bb982022.aspx
g++ output DOES NOT match web page


The following sample routines never return from the test program:

Poisson Distribution
http://msdn.microsoft.com/en-us/library/bb982995.aspx
never returns

Binomial Distribution
http://msdn.microsoft.com/en-us/library/bb982497.aspx
never returns

Testing C++ TR1 random number generation
http://www.johndcook.com/test_TR1_random.html
never returns



Could someone tell me what might be wrong?  Is the Debian TR1 support
not working correclty?  Is the sample code invalid?  Would Boost work
better on this sample code?  Is TR1 support not ready for prime time?


Thanks!

Lester

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: What versions of C standard does GCC support?
  2009-08-31 10:49 What versions of C standard does GCC support? Tim
  2009-08-31 11:04 ` Tim Prince
@ 2009-08-31 15:09 ` Marshall B. Rogers
  1 sibling, 0 replies; 4+ messages in thread
From: Marshall B. Rogers @ 2009-08-31 15:09 UTC (permalink / raw)
  To: Tim; +Cc: GCC Help Mailing List

Hey,

Well, the three big ones are K&R C, C89, and C99 - although the latter
is not implemented fully (see: http://gcc.gnu.org/c99status.html). I
would recommend using the most recent: C99 (so, -std=c99). Or if
you're only planning on using GCC, you can also use gnu99, which
enables the GNU extensions to C99.

On Mon, Aug 31, 2009 at 3:34 AM, Tim<timlee126@yahoo.com> wrote:
> Hi,
>  I am confused by reading http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Standards.html, which says "GCC supports three versions of the C standard". It seems says more than one versions. Can anyone clarify it? Which version is the most popular now and recommended?
> Thanks and regards!
>
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-08-31  5:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-31 10:49 What versions of C standard does GCC support? Tim
2009-08-31 11:04 ` Tim Prince
2009-08-31 14:50   ` problems with TR1 distributions A. Lester Buck III
2009-08-31 15:09 ` What versions of C standard does GCC support? Marshall B. Rogers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).