LWN.net Logo

Quotes of the week

Quotes of the week

Posted Mar 15, 2007 16:07 UTC (Thu) by tjc (subscriber, #137)
In reply to: Quotes of the week by nix
Parent article: Quotes of the week

This is the one situation in which the decay of arrays to pointers is detectable. Obviously declaring a parameter using the [] syntactic sugar, e.g. char *argv[] doesn't help; it's still a pointer, not an array.
It's pretty inconsistent syntactic sugar at that. It's interesting that void f1(int *foo) is the same as void f1(int foo[]), but int *f2(void) is not the same as int f2(void)[].


(Log in to post comments)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds