Enhanced printk() merged
Enhanced printk() merged
Posted Jul 17, 2008 17:41 UTC (Thu) by nix (subscriber, #2304)In reply to: Enhanced printk() merged by meuh
Parent article: Enhanced printk() merged
Yes indeed, and printk() is marked up with the printf attribute. The trick is to find a way to define new format characters that doesn't cause GCC to warn about all of them. There were attempts in the past to make the format attributes dynamically redefinable, but if I recall correctly the consensus in the end was that this was simply too damn complicated. (I wonder if what we need is loose versions of the format attribute's archetypes, which warn about incorrect numbers of parameters and type mismatches for format letters GCC knows about, but does not check format letters that GCC doesn't know? As long as nobody tries to reimplement something like .* which changes the number of arguments consumed, this should work fine.)