home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!olivea!spool.mu.edu!sdd.hp.com!hpscit.sc.hp.com!hplextra!hpfcso!hpcss01!hpcuhe!dhandly
- From: dhandly@hpcuhe.cup.hp.com (Dennis Handly)
- Newsgroups: comp.sys.hp
- Subject: Re: cc: Internal error 5705.
- Message-ID: <31480306@hpcuhe.cup.hp.com>
- Date: 7 Jan 93 03:13:10 GMT
- References: <0fDUS7y00WBLA1ms85@andrew.cmu.edu>
- Organization: Hewlett-Packard Cal Language Lab
- Lines: 61
-
- >Anyone familiar with what *this* highly user friendly message means
- >It appears to occur in the /lib/ccom pass.
-
- Well if you have Pascal installed you can look in /usr/lib/paserrs
- and see the following:
-
- 5705 Ustack underflow (5705)
-
- $ CAUSE: Internal compiler error.
-
- $ ACTION: Report error to your nearest HP Service Representative.
-
- I'm not sure that you'll like that any better. :-)
-
- Pascal has printed this message out for awhile, but I've just changed
- it to print out the statement number in question so the user can 'fiddle'
- with the code to try to make the problem go away. I.e. simplify and
- use extra temporaries.
-
- Normally this error occurs when the front-end doesn't follow the correct
- code generation protocol. It usually occurs in conditional branching
- like if, while, and (?:).
-
- Your problem is the following???
-
- SR NUMBER: 4701132837
- DESC: Compiler generates Internal error 5705
-
- PROBLEM TEXT
-
- The program below gets internal error 5705. It seems that
- the C front-end is generating incorrect intermediate code
- causing the internal error.
-
- The internal error is produced when a conditional expression
- with the ternary operator, evaluated for effect and not for
- value, performs as a side effect a store into a narrow type
- such as float, char or short.
-
- TEMPORARY SOLUTION
-
- Use the result returned from the conditional expression:
- Either assign it to a dummy temporary, test it, or use it
- in a function call. For example:
-
- typedef struct Submessage { unsigned char type, dump; } Submessage;
- Submessage *CurSubMsg;
-
- yylex() {
- int dumb; /* don't need to use this */
- dumb = (2 == 1 ? (CurSubMsg->dump=1) : (CurSubMsg->type=2));
- }
-
- FIX INFORMATION
-
- This functionality will appear in:
- HP-UX version 9.00, and cc version A.9.18.
- MPE/iX version 5.0, and ccxl version A.05.00.
-
-
- Or maybe 4701157420 which is very similar.
-