 |
Software > Software Development > C and C++ Compilers >
|
 |
 |
 |
C/C++ Doesn't Allow Instream Compiles with CSECT option
|
| | | Problem(Abstract) | CBC3575 or CBC1742 Csect option is ignored due to naming error.
// EXEC PGM=CCNDRVR,PARM=CSECT
//SYSIN DD *
#pragma csect(CODE,"hello")
Before the pragma is used by the compiler, the compiler tries to assign a name by looking at the input data set name. | | | | | | Cause | | The compiler can't deduce a name from the SYSIN DD * so it gives that error and quits. There is no warning in the C/C++ Language reference book or in the C/C++ User's Guide against this. The CSECT compiler option is processed first and fails because of the absence of a qualifer, the #pragma does not have a chance to be processed and override. Therefore, the CSECT option should not be used without a qualifier when dealing with inline source. In this case, either an explicit qualifier should be used with the CSECT option or NOCSECT should be used for the #pragma to come into effect. As the order of CSECT processing is documented in the C/C++ User's Guide, this behaviour is correct. | | | | | Resolving the problem | Use compile option CSECT(hello), with or without the #pragma csect, or to use NOCSECT with the #pragma csect. | | | | | | | | | Cross Reference information | | Segment | Product | Component | Platform | Version | Edition | | Software Development | OS/390 C/C++ | | OS/390 | 2.10.0 | |
| Historical Number | | BDC000027917 | | | | | |
 |
| IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml. |
 |
 |
 |
| Please take a moment to complete this form to help us better serve you. |
 |
 |
 |
|
|
|
 |
 |
| Product categories: |
 |
| | Software |  |
| | Software Development |  |
| | Traditional Progamming Language & Compilers |  |
| | OS/390 C/C++ |  |
 |
| Operating system(s): |
| |
z/OS
|
 |
| Software version: |
| |
1.6, 1.7, 1.8, 1.9
|
 |
| Reference #: |
| |
1143494
|
 |
| IBM Group: |
| | Software Group |
 |
| Modified date: |
| | 2003-10-29 |
 |
|