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]
Other format: [Raw text]

Re: a question about structure convert to char* in function printf/fprintf




On 08/13/2018 03:13 AM, Jonathan Wakely wrote:
On Sun, 12 Aug 2018 at 15:59, zerons wrote:
Should gcc give it an error to prevent a structure from converting to
char* in functions printf/fprintf?

Your question is inappropriate on this mailing list, please use
gcc-help next time. See https://gcc.gnu.org/lists.html
I'm so sorry for that.


Did you try compiling with warnings? If not, why not.

-Werror=format will give you an error.

Oh, I forget to use -Werror. I use -Wall a lot. :(
Unfortunately I didn't try to solve all the warnings.
Thanks.


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