This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

C preprocessor failure




daemon@cygnus.com wrote:

> Sorry, I am unable to deliver your mail note to egcs-bugs@cygnus.com,
> that list name is no longer used.  Please try resending your mail
> note to the new list name:  egcs-bugs@egcs.cygnus.com.
>
> If you have any questions about this, send mail to sourcemaster@cygnus.com.
> This is a machine-generated message.
>
> Here is a copy of the note you sent.
> -----------------------------------------------------------------------------
>
> GNU compiler bugs,
>
> The command is:  gcc -Wall -c -o prefail.o prefail.c
>
> Inside an #ifdef that should not be included after preprocessing,
> there are some \ characters escaping " characters.  The preprocessor
> should ignore them but it fails with the error message:
>
>     prefail.c:15: unterminated string or character constant
>     prefail.c:11: possible real start of unterminated constant
>     prefail.c:10: unterminated `#if' conditional
>
> Here is the file that fails with gcc It works on either sparc solaris or
>
> x86 linux redhat release 6.2.
>
> It is version egcs-2.91.66 native x86 and 2.95.2 for Mips cross compiler
>
> under solaris.
>
> Sincerely,
>
> Stephen Olsen
>
> This one should work on both:
>
> Here is the file:
>
> #include <stdio.h>
>
> int main()
> {
>         printf("Hello world\n");
>
> /* hmmm why does this preprocessor directive not work here??? */
> /* I think it is the \ character */
>
> #ifdef DO_NOT_PROCESS
> <input type=\"text\" name=\"designation\">vendor description
>
> #endif
>
>         printf("Goodbye world\n");
>         return (0);
> }
> /***** ENDOFFILE******/
>
> This one should pass on one host and fail on the other.
>
> file2:
> #include <stdio.h>
>
> int main()
> {
>         printf("Hello world\n");
>
> /* hmmm why does this preprocessor directive not work here??? */
> /* I think it is the \ character */
>
> /*
> <input type=\"text\" name=\"designation\">vendor description
>
> */
>
>         printf("Goodbye world\n");
>         return (0);
> }
> /*****ENDOFFILE*****/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]