This is the mail archive of the gcc-patches@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: [C PATCH] Disallow subtracting pointers to empty structs (PR c/58346)


On Thu, 23 Jan 2014, Marek Polacek wrote:

> > 2014-01-16  Marek Polacek  <polacek@redhat.com>
> > 
> > 	PR c/58346
> > c-family/
> > 	* c-common.c (pointer_to_zero_sized_aggr_p): New function.
> > 	* c-common.h: Declare it.
> > cp/
> > 	* typeck.c (pointer_diff): Give an error on arithmetic on pointer to
> > 	an empty aggregate.
> > c/
> > 	* c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
> > 	an empty aggregate.
> > testsuite/
> > 	* c-c++-common/pr58346-1.c: New test.
> > 	* c-c++-common/pr58346-2.c: New test.
> > 	* c-c++-common/pr58346-3.c: New test.

OK.

-- 
Joseph S. Myers
joseph@codesourcery.com


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