https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104084

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Martin Liška from comment #6)
> Started with r12-6375-g6cd51207f5732b52.
> 
> Reduced test-case:
> 
> $ cat pr104084.C
> int nothrow;
> struct MaxAlignedAllocable {
>   void *operator new[](unsigned long, int);
>   void operator delete[](void *);
>   long Resize_size;
>   void Resize() { new (nothrow) MaxAlignedAllocable[Resize_size]; }
> };

Better not hardcode a particular size_t (for more recent standard versions one
could use decltype (sizeof 0) too).
int nothrow;
struct MaxAlignedAllocable {
  void *operator new[](__SIZE_TYPE__, int);
  void operator delete[](void *);
  long Resize_size;
  void Resize() { new (nothrow) MaxAlignedAllocable[Resize_size]; }
};

Reply via email to