Quote:
Originally Posted by jamesbon
In following program I want to use attribute keyword of C and format string as printf
|
You seem to be starting from the point of wanting to use one of the compiler's features, as opposed to doing the job the right way. The format attribute GCC provides is to sanitise function inputs at compile-time. You don't define any functions that take varadic arguments according to a format string, so a format attribute cannot be used here.
Quote:
Originally Posted by jamesbon
I am not clear as what modifications should I do in it.
|
Neither am I - possibly this is because you don't need to use GCC's attributes?