Skip to content

Conversation

@NinaRanns
Copy link
Collaborator

… one

Thanks for taking the time to contribute to GCC! Please be advised that if you are
viewing this on github.com, that the mirror there is unofficial and unmonitored.
The GCC community does not use github.com for their contributions. Instead, we use
a mailing list ([email protected]) for code submissions, code reviews, and
bug reports. Please send patches there instead.

Copy link
Owner

@iains iains left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry for iteration here ..

return contract_valid_p (TREE_VALUE (TREE_VALUE (attribute)));
}

int comparing_contracts;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am very sorry I missed this on the first pass - adding global state to the compiler is not likely to be accepted (we are trying to move in the opposite direction - i.e. remove such state). IFF this is needed here, can it not be added to the scope or so? ... alternate suggestion below...

gcc/cp/cp-tree.h Outdated
/* Nonzero if we are matching contracts of two functions. Depending on
whether a decl has been genericized or not, PARM_DECL may be adjusted
to be an invisible reference. */
extern int comparing_contracts;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of having global state here - perhaps a defaulted extra parm to the cp_tree_equal () fn would work (if we cannot use the current scope for some reason). That means one does not have to go through and adjust all the other callers - only the one from contracts.cc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants