l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
September 2: Social gathering
Next Installfest:
TBD
Latest News:
Aug. 18: Discounts to "Velocity" in NY; come to tonight's "Photography" talk
Page last updated:
2006 Feb 08 13:34

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] cygwin - segfault on array allocation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] cygwin - segfault on array allocation



On Wed, Feb 08, 2006 at 12:13:08PM -0800, Daniel A. Lorca-Martinez wrote:
> >  > First: note that the above is not portable code. C++ does not support
> >>  variable-length arrays (that is, the bracketed expression must be a
> >>  constant). As long as you're constraining yourself to g++, though, or
> >>  other ones that support this extension, you're fine. (VLAs /are/
> >>  supported in the current version of the ISO C Standard, BTW).
> >
> >How does one gain this kind of knowledge at fingertips?
> >
> >(snip)
> 
> Well, one way is to occasionally work with less forgiving 
> compilers...then you find out that they're not actually wrong when 
> you bang your head against a wall for some really stupid bug :).

I've thought from time to time of building a virtual C implementation
that pushes the extremes (configurably) of what a conforming
implementation is allowed to have. For instance, 9-bit bytes (char type,
and that wouldn't apply to POSIX apps), non twos-complement
representation for signed integers... I'd still like to do this
sometime, but really I'm guessing a good lint catches a lot of the sorts
of things this might address. Still, it'd be fun, and I could have it do
crazy things when "undefined behavior" is invoked (still can't work out
how to make demons (daemons?) fly out the user's nose, though. I'd still
like to implement this idea sometime...

It's my understanding that certain forms of undefined behavior, in
ancient versions of gcc, would cause it to fire up nethack. :-)

-- 
Micah J. Cowan
micah@cowan.name
_______________________________________________
vox-tech mailing list
vox-tech@lists.lugod.org
http://lists.lugod.org/mailman/listinfo/vox-tech



LinkedIn
LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
facebook
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
Sunset Systems
Who graciously hosts our website & mailing lists!