Fewer lines of code and more maintainable.
Would this make more sense to the user as something like:
printf(" unknown(0x%jx)", (uintmax_t)val);
This is weird, why not do &= ~ ?
It would make more sense to print each unknown flag individually. At least I do find it more useful, from my experience with the Intel CPUID bits and DMAR capabilities reports.
Not a bad idea, I will keep it in mind for a followup