> I doubt that anytime soon compilers will be able to analyze these > varargs > functions automatically (well, you could try to do use some > heuristics, like > searching for a switch, but..), so my idea was to expose some kind > of API to > the programmers to allow them to specify some arbitrary function to > validate > the arguments. > GCC supports the following: > void my_printf(const char *format, ...) > __attribute__((format(printf, 1, > 2))); > > but GCC only supports the printf and scanf functions. My idea was to > generalize this, by allowing the user to specify some function > (without > touching in the compiler's code). > While the idea seems fairly acceptable, I don't have any syntax > proposal. > > Reference: http://gcc.gnu.org/ml/gcc/2006-11/msg00331.html
Something like this would be very nice, but it has to be simple enough to be comprehendible by actual mortals, therein lies the trick :) -Chris _______________________________________________ cfe-dev mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
