This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
__builtin_return_address why const parameter ?
- To: gcc at gcc dot gnu dot org
- Subject: __builtin_return_address why const parameter ?
- From: Ulrich Lauther <ulrich dot lauther at mchp dot siemens dot de>
- Date: Wed, 22 Sep 1999 16:50:23 +0200 (MET DST)
- Reply-To: Ulrich dot Lauther at mchp dot siemens dot de
why am I forced to write clumsy code like this:
void* bra = 0;
switch (level) {
case 1: bra = __builtin_return_address(1); break;
case 2: bra = __builtin_return_address(2); break;
case 3: bra = __builtin_return_address(3); break;
case 4: bra = __builtin_return_address(4); break;
default: ;
}
return bra;
instead of:
return __builtin_return_address(level);
in other words, why does __builtin_return_address() insist on a
integer constant as parameter?
--
-lauther
----------------------------------------------------------------------------
Ulrich Lauther ph: +49 89 636 48834 fx: ... 636 42284
Siemens ZT SE 4 Internet: Ulrich.Lauther@mchp.siemens.de
--
-lauther
----------------------------------------------------------------------------
Ulrich Lauther ph: +49 89 636 48834 fx: ... 636 42284
Siemens ZT SE 4 Internet: Ulrich.Lauther@mchp.siemens.de