Summary: | cpp trying to expand "vector" word in commented line in fortran file on power8 | ||
---|---|---|---|
Product: | gcc | Reporter: | Valery Weber <valeryweber> |
Component: | fortran | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | burnus |
Priority: | P3 | ||
Version: | 4.9.1 | ||
Target Milestone: | --- | ||
Host: | Target: | powerpc*-*-* | |
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | 2014-12-09 00:00:00 |
Description
Valery Weber
2014-09-30 06:52:39 UTC
I don't see it on x86_64-apple-darwin14 (4.8.3, 4.9.2, 5.0). This should reported to Ubuntu. Note that cpp is not part of Fortran, so the component is probably wrong. s/This should reported/This should be reported/ By the way, cpp -dM </dev/null shows all predefined macros - there should be also a definition for 'vector', I presume. (On my system, there isn't.) You could try processing the file with "-undef", which should drastically reduce the number of defines. OR, looking at the code below, you could try: -std= (such as "c90", cf. "man cpp"), which seems to disable the "vector" expansion. What's missing is a proper Fortran support in libcpp, which is able to handle Fortran comments etc. That's tracked, e.g., in PR 28662. * * * Code wise, it comes from the following code in gcc/config/spu/spu-c.c: if (!flag_iso) { /* Define this when supporting context-sensitive keywords. */ cpp_define (pfile, "__VECTOR_KEYWORD_SUPPORTED__"); cpp_define (pfile, "vector=vector"); /* Initialize vector keywords. */ __vector_keyword = get_identifier ("__vector"); C_CPP_HASHNODE (__vector_keyword)->flags |= NODE_CONDITIONAL; vector_keyword = get_identifier ("vector"); C_CPP_HASHNODE (vector_keyword)->flags |= NODE_CONDITIONAL; /* Enable context-sensitive macros. */ cpp_get_callbacks (pfile)->macro_to_expand = spu_macro_to_expand; } |