🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.bug
Article #1012

Re: Apparent g++ problem

#1012
From: David Kastrup
Date: Fri, 02 Oct 1992 17:23
31 lines
1693 bytes
jj00@etherm.co.UK (John Juer) writes:

>gcc version 2.2.2, on Interactive version 3.0

>It seems that when compiling without the optimiser and with debug on
>in-line functions do not get in-lined, resulting in undefined symbols
>on the final link.

>(jay)$ g++ -c -O -I../include -Di386ix prctxt.C
>(jay)$ nm prctxt.o | fgrep _12symbol_stacki
>the final link worked fine

>(jay)$ g++ -c -g -I../include -Di386ix prctxt.C
>(jay)$ nm prctxt.o | fgrep _12symbol_stacki
>__12symbol_stacki   |       0|extern|                  |      |     |

>__12symbol_stacki was undefined on the final link.

>This was an in-line function, here is an extract from the header file.

>#pragma interface
And some.

Do include the complete files in a bug report. More likely than not,
you have not included an instance of your header file once with
#pragma implementation
Since #pragma interface has the sole purpose of avoiding to generate
inline and member function instances, that is likely to be the bug.
If you use -O, inline functions are generated inline, and thus the
missing backup version does no harm, except when you want to use it in
a debugger expression.
Technical Details
Message-ID: <dak.718046615@kaa>
Path: arc1-ca.pugleaf.net!sparky!uunet!convex!darwin.sura.net!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!kaa.informatik.rwth-aachen.de!dak
References: <15557.9210011204@pine.eurotherm.co.uk>

Show Full Headers
Complete Article Headers
Newsgroups: gnu.g++.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!convex!darwin.sura.net!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!kaa.informatik.rwth-aachen.de!dak
From: dak@kaa.informatik.rwth-aachen.de (David Kastrup)
Subject: Re: Apparent g++ problem
Message-ID: <dak.718046615@kaa>
Sender: gnulists@ai.mit.edu
Organization: Rechnerbetrieb Informatik  /  RWTH Aachen
References: <15557.9210011204@pine.eurotherm.co.uk>
Distribution: gnu
Date: Fri, 2 Oct 1992 17:23:35 GMT
Approved: bug-g++@prep.ai.mit.edu
Lines: 32