| 
            Last change
 on this file since cc0aa8c was             4d860ea3, checked in by Michael Brooks <mlbrooks@…>, 2 years ago           | 
        
        
          | 
             
Fix compiler bug where duplicate type declarations caused crash. 
 
And add missing test.  The test runs and fails with the previous cfa compiler. 
 
           | 
        
        
          
            
              - 
Property                 mode
 set to                 
100644
               
             
           | 
        
        
          | 
            File size:
            777 bytes
           | 
        
      
      
| Line |   | 
|---|
| 1 | // Keep harmonized with errors/scope.
 | 
|---|
| 2 | 
 | 
|---|
| 3 | #ifdef OMIT_DRIVING_REJECTIONS
 | 
|---|
| 4 | // For manual sanity checking:
 | 
|---|
| 5 | // Leave out the offensive declarations and verify that what's left is accepted.
 | 
|---|
| 6 | #define EXPREJ(...)
 | 
|---|
| 7 | #else 
 | 
|---|
| 8 | #define EXPREJ(...) __VA_ARGS__
 | 
|---|
| 9 | #endif
 | 
|---|
| 10 | 
 | 
|---|
| 11 | 
 | 
|---|
| 12 |         int thisIsAnError;
 | 
|---|
| 13 | EXPREJ( int thisIsAnError; )
 | 
|---|
| 14 | 
 | 
|---|
| 15 |         int thisIsNotAnError;
 | 
|---|
| 16 |         float thisIsNotAnError;
 | 
|---|
| 17 | 
 | 
|---|
| 18 |         int thisIsAlsoNotAnError() {
 | 
|---|
| 19 |           int thisIsNotAnError;
 | 
|---|
| 20 |         }
 | 
|---|
| 21 | 
 | 
|---|
| 22 |         int thisIsAlsoNotAnError( double x ) {
 | 
|---|
| 23 |         }
 | 
|---|
| 24 | 
 | 
|---|
| 25 |         double thisIsStillNotAnError( double );
 | 
|---|
| 26 |         double thisIsStillNotAnError( double );
 | 
|---|
| 27 | 
 | 
|---|
| 28 |         double butThisIsAnError( double ) {
 | 
|---|
| 29 |         }
 | 
|---|
| 30 | EXPREJ(
 | 
|---|
| 31 |         double butThisIsAnError( double ) {
 | 
|---|
| 32 |         }
 | 
|---|
| 33 | )
 | 
|---|
| 34 | 
 | 
|---|
| 35 | // Local Variables: //
 | 
|---|
| 36 | // tab-width: 4 //
 | 
|---|
| 37 | // End: //
 | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.