This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: a question about structure convert to char* in function printf/fprintf
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: sironhide0null at gmail dot com
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Sun, 12 Aug 2018 20:13:09 +0100
- Subject: Re: a question about structure convert to char* in function printf/fprintf
- References: <98d9cfa2-dc9d-242a-7f02-8de48a4f4fff@gmail.com>
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
Did you try compiling with warnings? If not, why not.
-Werror=format will give you an error.