[patch, avr] Tidy up avr-log.c

Georg-Johann Lay avr@gjlay.de
Tue Feb 24 15:33:00 GMT 2015


avr-log.c and respective macros in avr-protos.h still assume that the 
implementation language is C90, i.e. no variadic macros are available.

This patch cleans up the code from the cumbersome old approach and uses 
variadic macros for avr_dump, avr_edump and avr_fdump.

Ok for trunk?

Johann


	Use variadic macros with avr-log.c.

	* config/avr/avr-protos.h (avr_vdump): New prototype.
	(avr_log_set_caller_e, avr_log_set_caller_f): Remove protos.
	(avr_edump, avr_fdump, avr_dump): (Re)define to use avr_vdump.
	* config/avr/avr-log.c: Adjust comments.
	(avr_vdump): New function.
	(avr_vadump): Pass caller as 2nd argument instead of format string.
	(avr_log_caller, avr_log_fdump_e, avr_log_fdump_f)
	(avr_log_set_caller_e, avr_log_set_caller_f): Remove.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tidy-avr-log.diff
Type: text/x-patch
Size: 4504 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20150224/f284fa03/attachment.bin>


More information about the Gcc-patches mailing list