Searching \ for 'Compiler phasing error' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: techref.massmind.org/techref/index.htm?key=compiler+phasing
Search entire site for: 'Compiler phasing error'.

Truncated match.
PICList Thread
'Compiler phasing error'
1997\04\28@040403 by ms

flavicon
face
--
>Wath's means "Compiler phasing error" ????. How can help me??? Tanks.


Dear Fabio,

the "Compiler phasing error" is the peculiar manner, how mplab-c now and
then announces a syntax error. From my experience I can tell you that
mostly you can find the according line from examining the listfile
(which is incomplete in this case).

Usually the "Compiler phasing error" seem to be caused by an ordinary
syntax problem (like a missing ; at the end of a statement) but
sometimes also valid
C statements seem to cause an internal crash of the mplab-c compiler
(for example if there is source-code only inside the ELSE tree of an IF
statement)

Good luck & Best regards,

Marc Schmaeche

-----------------------------------------------------------------------
        ZENTRUM  FUER  ANGEWANDTE  MIKROELEKTRONIK  UND  NEUE
        TECHNOLOGIEN  DER  BAYERISCHEN  FACHHOCHSCHULEN  E.V.

 Dipl.-Ing. M.Schmaeche     Tel.:   +49 (0)9131 691145
 ZAM-Anwenderzentrum Nbg.   Fax:    +49 (0)9131 691166
 Am Weichselgarten 7        E-Mail: spam_OUTmsTakeThisOuTspamzam.nf.fh-nuernberg.de
 91058 Erlangen, Germany             (Ger/Eng/Spa welcome)
-----------------------------------------------------------------------

1997\04\28@172516 by Robert Lunn

flavicon
face
>>What means "Compiler phasing error" ?

       A "phase" error is generated by a multi-pass compiler or
       assembler when the address assigned to a label on one pass
       is different to the address assigned to the same label on
       a subsequent pass.

       For a compiler to cause phase errors would generally be
       considered a bug.

>Usually the "Compiler phasing error" seem to be caused by an ordinary
>syntax problem (like a missing ; at the end of a statement) but
>sometimes also valid C statements seem to cause an internal crash of
>the mplab-c compiler (for example if there is source-code only inside
>the ELSE tree of an IF statement)

       The construct:

               if ( <expression> )
               else
                       <statement>

       (which is what you seem to be suggesting) is not valid 'C',
       and should be reported as a syntax error.

       However, the construct:

               if ( <expression> )
                       ;
               else
                       <statement>

       is valid, ';' being the null statement.

       If, in either case, you are getting a "phase" error (rather
       that a syntax error in the first case, or successful compilation
       in the second) then I would suspect a problem with the code
       optimisation pass of the compiler.  (Of course, if the first
       case is not generating a syntax error there is ALSO a bug in
       the syntax scanning pass of the compiler, which precedes the
       code optimisation pass.)

       The code generation pass of the compiler has generated a
       "goto" instruction for the 'if' body of the conditional
       statement.  The code optimisation pass has noticed a "goto"
       to a "goto" (from the expression evaluation to the 'if' body)
       and realised this could be replaced with a single "goto".
       In turn, this makes the second "goto" redundant (it will never
       be executed) and it has been deleted.  This has changed the
       addresses of all subsequent labels...

       "phase error"!

___Bob

More... (looser matching)
- Last day of these posts
- In 1997 , 1998 only
- Today
- New search...