Issue 26098 - idlc - parser.cxx - Cannot cast away const or volatile
Summary: idlc - parser.cxx - Cannot cast away const or volatile
Status: CLOSED FIXED
Alias: None
Product: Build Tools
Classification: Code
Component: code (show other issues)
Version: current
Hardware: PC Solaris
: P2 Trivial (vote)
Target Milestone: OOo 2.0
Assignee: jens-heiner.rechtien
QA Contact: issues@tools
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-03 22:22 UTC by doehrm
Modified: 2004-04-21 13:43 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description doehrm 2004-03-03 22:22:44 UTC
> CC -V
CC: Sun WorkShop 6 update 2 C++ 5.3 Patch 111686-19 2003/12/18

> uname -a
SunOS plonk 5.9 Generic_112234-11 i86pc i386 i86pc

> bison --version
bison (GNU Bison) 1.875c

I'm getting the error described in bug 11386:
bison -d -
o ../unxsoli4.pro/misc/parser.cxx ../unxsoli4.pro/misc/stripped_parser.y
../unxsoli4.pro/misc/stripped_parser.y: conflicts: 1 shift/reduce

but the build is continuing until

build -- version: 1.96

/home/doehrm/oocvs/idlc/source
------------------------------
Making: ../unxsoli4.pro/obj/parser.obj
CC  -c -temp=/tmp -I.  -I. -I../inc -I../inc -I../unx/inc -
I../unxsoli4.pro/inc -I. -I/home/doehrm/oocvs/solver/680/unxsoli4.pro/inc/stl -
I/home/doehrm/oocvs/solver/680/unxsoli4.pro/inc/external -
I/home/doehrm/oocvs/solver/680/unxsoli4.pro/inc -
I/home/doehrm/oocvs/solenv/unxsoli4/inc -I/home/doehrm/oocvs/solenv/inc -
I/home/doehrm/oocvs/res -
I/home/doehrm/oocvs/solver/680/unxsoli4.pro/inc/stl/SC5  -I/include -
I/home/doehrm/oocvs/solenv/inc/Xp31 -I/usr/java/include -
I/usr/java/include/solaris -I/usr/java/include/native_threads/include     -I. -
I../res -I. -O   -features=no%altspell,no%localfor   -instances=static -KPIC -
DSOLARIS -DUNX -DVCL -DC52 -DC52 -DINTEL -DCVER=C52 -D_USE_NAMESPACE -
D_PTHREADS -DSYSV -DSUN -DSUN4 -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -
DSTLPORT_VERSION=400 -D_PTHREADS -D__DMAKE -DUNIX -DCPPU_ENV=sunpro5 -
DSUPD=680 -DBUILD=8697 -DPRODUCT -DNDEBUG -DPRODUCT_FULL -DOSL_DEBUG_LEVEL=0 -
DOPTIMIZE -DEXCEPTIONS_ON -DCUI -DSOLAR_JAVA -DSRX680  -DMULTITHREAD  -
DMULTITHREAD  -o ../unxsoli4.pro/obj/parser.o ../unxsoli4.pro/misc/parser.cxx
"../unxsoli4.pro/misc/stripped_parser.y", line 205: Error: Cannot cast away 
const or volatile.
"../unxsoli4.pro/misc/stripped_parser.y", line 446: Warning: String literal 
converted to char* in formal argument 1 in call to yyerror(char*).
"../unxsoli4.pro/misc/stripped_parser.y", line 647: Warning: String literal 
converted to char* in formal argument 1 in call to yyerror(char*).
"../unxsoli4.pro/misc/stripped_parser.y", line 872: Warning: String literal 
converted to char* in formal argument 1 in call to yyerror(char*).
"../unxsoli4.pro/misc/stripped_parser.y", line 988: Warning: String literal 
converted to char* in formal argument 1 in call to yyerror(char*).
"../unxsoli4.pro/misc/stripped_parser.y", line 1509: Warning: String literal 
converted to char* in formal argument 1 in call to yyerror(char*).
"../unxsoli4.pro/misc/stripped_parser.y", line 2318: Warning: String literal 
converted to char* in formal argument 1 in call to yyerror(char*).
"../unxsoli4.pro/misc/stripped_parser.y", line 2443: Warning: String literal 
converted to char* in formal argument 1 in call to yyerror(char*).
"../unxsoli4.pro/misc/stripped_parser.y", line 2517: Warning: String literal 
converted to char* in formal argument 1 in call to yyerror(char*).
"../unxsoli4.pro/misc/parser.cxx", line 4829: Warning: String literal converted 
to char* in formal argument 1 in call to yyerror(char*).
"../unxsoli4.pro/misc/parser.cxx", line 4833: Warning: String literal converted 
to char* in formal argument 1 in call to yyerror(char*).
"../unxsoli4.pro/misc/parser.cxx", line 4951: Warning: String literal converted 
to char* in formal argument 1 in call to yyerror(char*).
1 Error(s) and 11 Warning(s) detected.
dmake:  Error code 1, while making '../unxsoli4.pro/obj/parser.obj'
---* TG_SLO.MK *---

The offending line looks like

void checkNameClashes(AstInterface * pInterface, NameMap & map)
{
    DeclList const & super = pInterface->getInheritedInterfaces();
    {for (DeclList::const_iterator i(super.begin()); i != super.end(); ++i) {
        checkNameClashes(static_cast< AstInterface * >(*i), map);
-------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    }}
    {for (DeclList::iterator i(pInterface->getIteratorBegin());
          i != pInterface->getIteratorEnd(); ++i) {
        std::pair< NameMap::iterator, bool > res(
            map.insert(NameMap::value_type((*i)->getLocalName(), *i)));
        if (!res.second
            && res.first->second->getScopedName() != (*i)->getScopedName())
        {
            idlc()->error()->error2(EIDL_REDEF_SCOPE, *i, res.first->second);
        }
    }}
}

Is my build config outdated (Forte 6U2 on Solaris Intel) or is this a compiler 
bug?

Thanx for your assistance!
Comment 1 Martin Hollmichel 2004-03-05 15:18:12 UTC
mh-.hr: can please assist on these Solaris/x86 problem/question ?
Comment 2 jens-heiner.rechtien 2004-04-21 13:38:36 UTC
The offending line of code has been removed in SRC680 m34. Newer version of
parser.y yhould just compile fine. If you still want to compile the old version
I would recommend changing the static_cast<> into an old style cast.

Resolve issue to 'Fixed'.
Comment 3 jens-heiner.rechtien 2004-04-21 13:43:53 UTC
Closing.