------- Comment #12 from manu at gcc dot gnu dot org 2007-03-28 00:21 ------- (In reply to comment #11) > Manuel: Yes, the patch is against 3.3 series, I didn't actually formally > submit it but just posted it to the list when someone was in need of a patch. > See > > http://gcc.gnu.org/ml/gcc/2004-07/msg00798.html > > Before resubmitting I would /of course/ a) up-port to current mainline b) > use > the most appropriate of the current options-handling mechanisms and c) add > testcases and docs. Can you advise me what you think the best way to add the > option is? I particularly think I ought to avoid "manually copying a global > in c_common_post_options" (as I wrote at url above). >
I was not criticizing your patch. Tom asked and I gave my opinion: that the patch would need to be updated by someone (not necessarily you) before being accepted. To see the proper way to add the option look for endif_labels in c.opt and c-opts.c. Notice that you don't need to define a global option anymore in gcc/flags.h (although it seems that you still need it in libcpp/include/cpplib.h). To keep current behaviour, you need to enable the option by default. If it were a front-end option you would need to enable it in c.opt using Init(1) (see other options in the same file). However, I don't think that setting affects automatically CPP options, so probably you need to set the option in libccp/init.c as you do in your original patch. Of course, you also need to conditionalize the warning on the option, but your patch already does this. I hope this helps. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14331