Bug creation and email sending has been disabled, file new bugs at gcc.gnu.org/bugzilla
View | Details | Raw Unified | Return to bug 114
Collapse All | Expand All

(-)a/gcc/d/d-codegen.cc (-8 / +17 lines)
Lines 792-811 d_attribute_p (const char* name) Link Here
792
{
792
{
793
  static StringTable* table;
793
  static StringTable* table;
794
794
795
  if(!table)
795
  if(table == NULL)
796
    {
796
    {
797
      // Build the table of attributes exposed to the language.
798
      // Common and format attributes are kept internal.
797
      size_t n = 0;
799
      size_t n = 0;
798
      for (const attribute_spec *p = d_attribute_table; p->name; p++)
800
      table = new StringTable();
801
802
      for (const attribute_spec *p = lang_hooks.attribute_table; p->name; p++)
799
        n++;
803
        n++;
800
804
801
      if(n == 0)
805
      for (const attribute_spec *p = targetm.attribute_table; p->name; p++)
802
        return false;
806
	n++;
803
807
804
      table = new StringTable();
808
      if(n != 0)
805
      table->_init(n);
809
	{
810
	  table->_init(n);
811
812
    	  for (const attribute_spec *p = lang_hooks.attribute_table; p->name; p++)
813
    	    table->insert(p->name, strlen(p->name));
806
814
807
      for (const attribute_spec *p = d_attribute_table; p->name; p++)
815
    	  for (const attribute_spec *p = targetm.attribute_table; p->name; p++)
808
        table->insert(p->name, strlen(p->name));
816
    	    table->insert(p->name, strlen(p->name));
817
	}
809
    }
818
    }
810
819
811
  return table->lookup(name, strlen(name)) != NULL;
820
  return table->lookup(name, strlen(name)) != NULL;
(-)a/gcc/d/d-lang.cc (-1 / +1 lines)
Lines 46-52 static tree d_handle_target_attribute (tree *, tree, tree, int, bool *); Link Here
46
46
47
static char lang_name[6] = "GNU D";
47
static char lang_name[6] = "GNU D";
48
48
49
const attribute_spec d_attribute_table[] =
49
static const attribute_spec d_attribute_table[] =
50
{
50
{
51
    { "noinline",               0, 0, true,  false, false,
51
    { "noinline",               0, 0, true,  false, false,
52
				d_handle_noinline_attribute, false },
52
				d_handle_noinline_attribute, false },
(-)a/gcc/d/d-lang.h (-1 lines)
Lines 202-208 extern void set_block (tree); Link Here
202
202
203
/* In d-builtins.c */
203
/* In d-builtins.c */
204
extern const attribute_spec d_builtins_attribute_table[];
204
extern const attribute_spec d_builtins_attribute_table[];
205
extern const attribute_spec d_attribute_table[];
206
extern const attribute_spec d_format_attribute_table[];
205
extern const attribute_spec d_format_attribute_table[];
207
tree d_builtin_function (tree);
206
tree d_builtin_function (tree);
208
void d_init_builtins (void);
207
void d_init_builtins (void);

Return to bug 114