public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* C/C++ diagnostics guidelines (was: Re: [C PATCH] Enable initializing statics with COMPOUND_LITERAL_EXPR in C99 (PR c/63567))
@ 2014-10-17 17:08 Manuel López-Ibáñez
  2014-10-17 17:34 ` Joseph S. Myers
  0 siblings, 1 reply; 7+ messages in thread
From: Manuel López-Ibáñez @ 2014-10-17 17:08 UTC (permalink / raw)
  To: Gcc Patch List, Joseph S. Myers, Marek Polacek, Paolo Carlini,
	Jason Merrill, Dodji Seketeli, Jonathan Wakely

> The Right Thing is for -pedantic not to cause errors, only warnings
> (-pedantic-errors being needed for an error).  So rather than having this
> conditional for whether to allow the extension at all, make the
> conditional code do a pedwarn (if flag_isoc99, otherwise there will
> already have been one for using a compound literal at all, and not for
> VECTOR_TYPE).  (I don't believe this can affect the semantics of valid
> code; in this case of require_constant with a compound literal, we know
> the code is invalid in ISO C terms, so it's safe to diagnose it then
> interpret it in a sensible way.)

I think there is roughly consensus about how C/C++ diagnostics should
work, but it is easy to forget it since it is not really written
anywhere.

Thus, I drafted some guidelines
at:https://gcc.gnu.org/wiki/Better_Diagnostics#guidelines

Please, could you take a look and comment whether I got it right/wrong?
New items are very welcome!

Cheers,

Manuel.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-11-01 23:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-17 17:08 C/C++ diagnostics guidelines (was: Re: [C PATCH] Enable initializing statics with COMPOUND_LITERAL_EXPR in C99 (PR c/63567)) Manuel López-Ibáñez
2014-10-17 17:34 ` Joseph S. Myers
2014-10-17 18:07   ` Manuel López-Ibáñez
2014-10-17 19:26     ` Manuel López-Ibáñez
2014-10-23 10:58       ` C/C++ diagnostics guidelines Dodji Seketeli
2014-10-23 10:40     ` Dodji Seketeli
2014-11-01 23:43       ` Manuel López-Ibáñez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).