From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED.6k1R0IQgF+3y+m4EkNohlQ.user.gioia.aioe.org!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: GNAT gcc flag for generating xref info? Date: Thu, 04 Jun 2020 17:43:59 +0100 Organization: Aioe.org NNTP Server Message-ID: References: <1629acc7-2aef-42dc-866e-cf652f8b25d0@googlegroups.com> NNTP-Posting-Host: 6k1R0IQgF+3y+m4EkNohlQ.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (darwin) X-Notice: Filtered by postfilter v. 0.9.2 Cancel-Lock: sha1:QhUWUA1hHC8t/g4eqHLi7CZt5/o= Xref: reader01.eternal-september.org comp.lang.ada:58958 Date: 2020-06-04T17:43:59+01:00 List-Id: Stephen Leake writes: > There used to be a flag -fdumpxref for the GNAT gcc C compiler that > output .gli files, which gnatcoll.xref parsed just as it does .ali > files for Ada code. > > But that is apparently gone; > > gcc.exe: error: unrecognized command line option '-fdumpxref' > > gnat/.../cc1.exe --help shows a flag -fxref, but that is also gone: > > gcc.exe: warning: switch '-fxref' is no longer supported > > So how do I use gnatcoll.xref with C code? You would have thought, given the maturity of GCC ( :-) ) that the ChangeLogs would contain some references to these switches. The only one I can see is that references to -fdump-xref in the Ada documentation were removed (because the switch was deprecated) in December 2017. The current GNAT Studio documentation says that the gnatinspect cross-reference database is deprecated. So I guess they're now using libadalang (and a putative libclang???) but since GNAT Studio isn't provided in the Mac CE 2020 pack and the 2019 version works fine on the rare occasions I need it I can't comment further.