This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

pre-processor wishlist ?



hello,
	I had this nice wish for 'gcc -E' to be able to do:

	I would want to be able to specify what kind of parsing
	it can do. So that say I first can have it process all
	#ifdef's, and then separately have it process all
	#defines and #includes.

	this would be great when:

	- i want to clean up file for sake of **readability**.
	it is pain to go thru file with dozens of ifdefs
	and try to find "live" code (emacs,xterm,xfree etc
	etc etc etc).

	- if I want to consolidate several files into one.
	so ideally I would want first remove all #ifdefs
	from all files. then I could grep out all #includes
	and put them on top and call remaining of all files
	together (I can't do that before removing #ifdefs
	as some includes might not apply for my configuration).
	this as well is useful in debugging and going over the
	source code.

	how does this sound? I don't think it should be hard to
	implement (few lines of code?)

-- 
Adam
http://www.eax.com      The Supreme Headquarters of the 32 bit registers



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]