Title: | DECC |
Notice: | General DEC C discussions |
Moderator: | TLE::D_SMITH N TE |
Created: | Fri Nov 13 1992 |
Last Modified: | Fri Jun 06 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 2212 |
Total number of notes: | 11045 |
I am using DEC C (Digital Unix Compiler Driver 3.11) on OSF1 V3.2 62 alpha. 1 foo() 2 { 3 #pragma pack(4) 4 struct my_struct { 5 char a; 6 ... 7 }; ... } When compile the above code using cc, the following errors occur. /usr/lib/cmplrs/cc/cfe: Error : ..., line 3: Syntax Error __pragma(4, 4); ^ /usr/lib/cmplrs/cc/cfe: Error: ..., line 4: Syntax Error struct my_struct { ___^ Interesting enough, cxx has no problems with the same code. Any insight will be appreciated. -James
T.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
2096.1 | QUARRY::metsky | I'm hysterical and I'm wet | Tue Feb 18 1997 15:30 | 4 | |
You're using the old ucode C compiler (acc). To use DEC C on DIGITAL UNIX V3.2 you need to use the -migrate option. -dave- | |||||
2096.2 | Try cc -migrate | DECCXL::WIBECAN | That's the way it is, in Engineering! | Tue Feb 18 1997 15:37 | 7 |
Under Unix V3.2, are you using cc -migrate? Without the -migrate switch, you would be using the older acc compiler, rather than DEC C. A test on a handy V3.2 system confirms that the error appears under acc and disappears with cc -migrate. Brian |