home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.std.c:2997 comp.lang.c:16231
- Newsgroups: comp.std.c,comp.lang.c
- Path: sparky!uunet!ukma!usenet.ins.cwru.edu!agate!stanford.edu!leland.Stanford.EDU!dkeisen
- From: dkeisen@leland.Stanford.EDU (Dave Eisen)
- Subject: Re: Array size checks
- Message-ID: <1992Nov9.192155.4819@leland.Stanford.EDU>
- Sender: news@leland.Stanford.EDU (Mr News)
- Organization: Sequoia Peripherals, Inc.
- References: <BxGnB6.5nt@dcs.ed.ac.uk>
- Date: Mon, 9 Nov 92 19:21:55 GMT
- Lines: 23
-
- In article <BxGnB6.5nt@dcs.ed.ac.uk> mikef@dcs.ed.ac.uk (Mike Fourman) writes:
- >
- >int big_array[10] ;
- >void function_using_small_array( int argument_array[5] ) ;
- >
- >Do any compilers warn about this usage? Shouldn't they?
- >
-
- Yeah, I think they should. Because while what you wrote is
- perfectly legal and standard C, it is probably not what you
- meant. Compilers are free to warn about anything they like,
- as long as they generate correct code for these legal, but
- dubious, constructs.
-
- I have no idea if in fact any compilers do warn about this
- usage.
-
-
- --
- Dave Eisen Sequoia Peripherals: (415) 967-5644
- dkeisen@leland.Stanford.EDU Home: (415) 321-5154
- There's something in my library to offend everybody.
- --- Washington Coalition Against Censorship
-