From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27157 invoked by alias); 7 Nov 2010 16:52:40 -0000 Received: (qmail 27134 invoked by uid 22791); 7 Nov 2010 16:52:40 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mx02.qsc.de (HELO mx02.qsc.de) (213.148.130.14) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 07 Nov 2010 16:52:29 +0000 Received: from [192.168.178.22] (port-92-204-76-125.dynamic.qsc.de [92.204.76.125]) by mx02.qsc.de (Postfix) with ESMTP id E033A1E889; Sun, 7 Nov 2010 17:52:26 +0100 (CET) Message-ID: <4CD6D94A.408@net-b.de> Date: Sun, 07 Nov 2010 16:52:00 -0000 From: Tobias Burnus User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.2.12) Gecko/20101026 SUSE/3.1.6 Thunderbird/3.1.6 MIME-Version: 1.0 To: Janus Weil CC: gfortran , gcc-patches Subject: Re: [Patch, Fortran, OOP] PR 46313: OOP-ABI issue, ALLOCATE issue, CLASS renaming issue References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact fortran-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: fortran-owner@gcc.gnu.org X-SW-Source: 2010-11/txt/msg00126.txt.bz2 Janus Weil wrote: > The patch avoids these naming ambiguities by including the module name > in the naming scheme for class containers and vtabs. > The patch was regtested on x86_64-unknown-linux-gnu. Ok for trunk? OK. I think we can worry about submodules and similar problem later - when real-world programs pop up which use them. At least there is then only a single place to change. Regarding $ vs. period vs. _: Seemingly, all platforms on which gfortran is used support the $ as there was not bug report so far. Thus, I think we can continue using it. Regarding user code: I somehow think it is unlikely that users have that strange variable names; if they do: It's their fault as $ is an not allowed in ISO Fortran. Janus Weil wrote: > Btw, what is the reason for the macro adding *two* underscores in > front, instead of just one? C allows leading underscores -- and according to the ISO C standard, identifiers which start with two underscores are for the internal use of the compiler. Steve Kargl wrote: > A leading underscore moves the issue from -fdollar-ok to > -fleading_underscore. Well, there is a difference. Many compilers support a $ sign - some also as first character (gfortran does not!). Most compilers do not support leading underscores; gfortran's -fleading_underscore only exists to generate (before BIND(C) was implemented) __gfortran_... procedures. -fleading_underscore is also not officially supported (e.g. it is not in the man page) - and there are some compile-time restrictions. I also do not think we need to explicitly take care of leading underscores (which can also be reached via BIND(C)) or $. If a user wants to shoot into his foot, the compiler does not need to prevent it. -- It just shouldn't encourage it. And if possible, standard conforming code should not break. If users plays around with __vtab$... I think its their fault. Tobias