This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, fortran] Constraints for equivalence members and privatetypes - Ping


Tobi,

I think an error message should preferably point to the place where the error
occurs.

EQUIVALENCE(i,j)
! <--- code perfectly valid until here
integer, target :: i   ! <--- this line tries to do something wrong

whereas

integer, target :: i
! <--- code perfectly valid until here
EQUIVALENCE(i,j) ! <--- this line tries to do something wrong


Yes, indeed, that is the logic of check_conflict. It is a pity that the attributes cannot flip around in the message.

I can see why one could like to have the error associated with the EQUIVALENCE
-- after all, the constraint that is violated is given together with the
syntax of EQUIVALENCE in the standard,


Exactly. That is why I marginally prefer the messages to be concentrated in resolve_equivalence.

but given the fact that adding new
conflicts is really easy, and keeps this code in one place without adding new
passes to resolution, I like this better.


Then I shall make it so.

Paul T


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]