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, OOP] PR 46313: OOP-ABI issue, ALLOCATE issue, CLASS renaming issue


Hi Thomas,

>> The patch was regtested on x86_64-unknown-linux-gnu. Ok for trunk?
>
> If we are going to change the naming of the OOP stuff anyway, what about
> the possible name collisions with -fdollar-ok ?

uh, good point. To be honest I wasn't even aware of this flag ...


> Should we put in an underscore, an at sign etc. or should we decide that
> anybody who creates a name collision like that with a non-standard
> extension deserves to lose?

Well, I can image that someone using a flag called '-fdollar-ok' would
expect that it's ok to use dollar signs without running into trouble.

So, yes, since we're about to change the naming anyway, I think we
should get rid of the dollars. Throwing in @s instead is fine with me,
or is there a downside to this choice, too?

I think the underscore is not an option, since it can also be used in
standard variable names, right?

Cheers,
Janus



> Test case:
>
> ig25@linux-fd1f:~/Krempel/Class> cat class.f90
> program main
> ?type :: dt
> ? ? ! ...
> ?end type dt
> ?class(dt), pointer :: cp
> contains
> ?subroutine vtab$dt
> ?end subroutine vtab$dt
> end program main
> ig25@linux-fd1f:~/Krempel/Class> gfortran -fdollar-ok class.f90
> class.f90:7.20:
>
> ?subroutine vtab$dt
> ? ? ? ? ? ? ? ? ? ?1
> Error: VARIABLE attribute of 'vtab$dt' conflicts with PROCEDURE
> attribute at (1)
> class.f90:8.5:
>
> ?end subroutine vtab$dt
> ? ? 1
> Error: Expecting END PROGRAM statement at (1)
>
>
>


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