------- Additional Comments From ro at techfak dot uni-bielefeld dot de 2005-07-07 17:11 ------- Subject: Re: Many attribute directive ignored warnings during Tru64 UNIX Ada bootstrap
pinskia at physics dot uc dot edu writes: > It is a latent bug in Ada front-end. RTH just exposed the latent bug. After some more digging around, I don't really believe so any longer: config/alpha/alpha.c (alpha_init_builtins) sets attributes const and/or nothrow for all alpha builtins. But those attributes are restricted to the C family: they are defined in c-common.c (c_common_attribute_table) only, so the C family languages don't have a problem. For the others, the situation is as follows: * Ada gives many warnings as this PR describes. * Fortran 95 isn't affected since fortran/f95-lang.c (builtin_function) only handles `const' and ignores everything else. * Java completely ignores attributes in java/decl.c (builtin_function) and thus isn't affected either. * Treelang is affected as well since it passes all attributes to decl_attributes in treelang/treetree.c (builtin_function), but also doesn't use c_common_attribute_table (and shouldn't). To check this, I bootstrapped mainline (C and Treelang only) on Tru64 UNIX V5.1B, and as expected, all treelang tests fail with the same error. So it seems like C-family specific attributes are set for all alpha builtins, which seems incorrect to me. Two possible solutions come to mind: * Make const and nothrow generic to avoid this. * Only set them for C family languages. I haven't yet checked how to implement either option, and don't know which one would actually be preferable. Rainer -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21952