This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: C++ Darwin Port BUG in source code
On Sun, 6 Feb 2005, Zack Weinberg wrote:
> Marcin Dalecki <martin@dalecki.de> writes:
>
> > On 2005-02-06, at 22:22, Andrew Pinski wrote:
> >
> >> On Feb 6, 2005, at 4:10 PM, Marcin Dalecki wrote:
> >>> I wonder why the corresponding pargma unused implementation in
> >>> darwin-c.c is calling c_lex() and similar functions, which appear
> >>> at least to be C code dependant. However strictly adhering to the
> >>> advice the attached patch should at least give proper semantics
> >>> then. <lookup_name.diff>
> >> Call c_lex is fine, if you look at the file c-pragma.c which is for
> >> both the C and C++ front-ends.
> >> What I would do instead of this (semi) huge patch is to make
> >> lookup_name in the C++ correspond to C prototype and change the C++
> >> front-end to use a newer function for the old lookup_name.
> >>
> >
> > Please look a bit closer. It's the C++ part which gets an additional
> > parameter to differentiate the name lookup scope (namespace type or
> > else).
>
> At this stage of code slush, the appropriate cure is probably to make
> the C version grow an extra unused argument, and change all callers to
> match. Without changing any function names. That'll be large, but
> it'll be completely mechanical and therefore low risk.
>
> Joseph, as C front end maintainer, do you have an opinion?
Even simpler and avoiding cluttering callers with an extra argument would
be renaming lookup_name to c_lookup_name and adding a lookup_name wrapper
which discards the extra parameter.
--
Joseph S. Myers http://www.srcf.ucam.org/~jsm28/gcc/
jsm@polyomino.org.uk (personal mail)
joseph@codesourcery.com (CodeSourcery mail)
jsm28@gcc.gnu.org (Bugzilla assignments and CCs)