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]

[Ada] Add new attribute System_Allocator_Alignment


This attribute returns the alignment honored by malloc.
The following program should display this value:
with Ada.Text_IO; use Ada.Text_IO;

procedure Alloc_Algn is
begin
   Put_Line ("malloc alignment:"
             & Integer'Image (Standard'System_Allocator_Alignment));
end Alloc_Algn;

Tested on x86_64-pc-linux-gnu, committed on trunk

2011-08-29  Tristan Gingold  <gingold@adacore.com>

	* sem_attr.adb, exp_attr.adb: Add handling of
	Attribute_System_Allocator_Alignment
	* snames.ads-tmpl: Add Name_System_Allocator_Alignment and
	Attribute_System_Allocator_Alignment.
	* ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
	* gcc-interface/targtyps.c, gcc-interface/utils2.c,
	gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
	get_target_system_allocator_alignment.

Attachment: difs
Description: Text document


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