This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/81543] attribute may_alias on function and variable declarations silently accepted
- From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 26 Jul 2017 09:56:56 +0000
- Subject: [Bug c/81543] attribute may_alias on function and variable declarations silently accepted
- Auto-submitted: auto-generated
- References: <bug-81543-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81543
--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
But adding one wouldn't help because
487 /* If we require a type, but were passed a decl, set up to make a
488 new type and update the one in the decl. ATTR_FLAG_TYPE_IN_PLACE
489 would have applied if we'd been passed a type, but we cannot
modify
490 the decl's type in place here. */
491 if (spec->type_required && DECL_P (*anode))
492 {
493 anode = &TREE_TYPE (*anode);
494 flags &= ~(int) ATTR_FLAG_TYPE_IN_PLACE;
495 }