Merge common attribute handling code between Ada and c-family. #244
No reviewers
Labels
No labels
Compat/Breaking
Frontend/ada
Frontend/c
Frontend/c++
Frontend/rust
General/forge
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Library/libgcc
Library/libstdc++
Midend/gimple
Midend/rtl
Midend/tree
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
Target/aarch64
Target/arm
Target/i386
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gcc/gcc!244
Loading…
Reference in a new issue
No description provided.
Delete branch "imperio:ada-common-attrs"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up of #207 and of #241.
It merges common code for attributes handling between the Ada front-end and
attr-handlers.c. I renamed some functions by prepending them withada_when it was also functions present inattr-handlers.h.CC: gcc-ada@gcc.gnu.org @dkm
/submit
Hi @imperio. This bot helps send your PR as a patch series to the mailing list.
Next steps
CC: Reviewer1 <revi.ewer@example.com>, Reviewer2 <an.other@example.com>./preview./submit.Changes since vXsection, and comment with/submitagain.See Submitting Patches and UsingForge.
Consider joining the gcc and gcc-patches mailing lists..
For real time communication, check the gcc irc channels.
Or join
#overseerson Libera Chat, particularly if this automation is not working (stay online to get replies, IRC does not save messages if people are not online).@forge-bot wrote in #244 (comment):
There's indeed no ada mailing list, and my forge handle isn't enough for any smtp to send me an email 😅 But I have the review on my TODO list, so that's fine.
See my first comment about the renaming. Apart from that, I think the changes are good 👍
@ -141,4 +123,0 @@static const struct attribute_spec::exclusions attr_noinline_exclusions[] ={{ "always_inline", true, true, true },I see the common part has
gnu_inlinehere, that's probably missing in the ada version.Do you want me to add it in this patch or in a follow-up?
Not sure I understand. While reviewing, I saw a small difference between the current Ada definition and the common (new) one. The common has the
gnu_inline, but the Ada doesn't. I believe the attribute is currently missing in the Ada, so your change also fixes this as a side effect. I don't think you need to do anything about it. Or maybe I'm missing something 😅@ -88,3 +89,2 @@/* Forward declarations for handlers of attributes. */static tree handle_const_attribute (tree *, tree, tree, int, bool *);static tree handle_nothrow_attribute (tree *, tree, tree, int, bool *);static tree ada_handle_const_attribute (tree *, tree, tree, int, bool *);I wonder if we should rename all functions instead of simply prefixing a subset. Having some function prefixed and some not may confuse reader into believing they are different. What do you think?
I'm fine with either solution. You seem to prefer prefixing them all with
ada_so I'll do so.18c2d246a9a32bdf9326Renamed the functions.
You probably need to update the changelog part of your commit because you have more renamings, and not all because of conflicting names 😅
GCC commit message. My old nemesis.
a32bdf93264e832f293e4e832f293eb34c994f6cFixed commit message.
@imperio wrote in #244 (comment):
Thanks, look good now 👍
Patch was merged as commit
1f54bb3ff1. Closing.Pull request closed