* error: missing terminating " character while modifying md file
@ 2008-05-10 0:04 Omar
2008-05-10 0:10 ` David Daney
0 siblings, 1 reply; 7+ messages in thread
From: Omar @ 2008-05-10 0:04 UTC (permalink / raw)
To: gcc-help
Ok, so after weeks of reading and looking at multiple .md files, I
felt ready to give it a try and decided to create some define_split's
on my own.
I created a define_split RTL pattern which included this condition:
"reload_completed
&& GET_CODE (operands[1]) == MEM
&& GET_CODE (XEXP (operands[1], 0)) == PLUS"
When I try to compile it I get:
../../gcc/config/c816/c816.md:36 error: missing terminating " character
../../gcc/config/c816/c816.md:37: error: stray '\' in program
...
If instead, I place the condition all in a single line:
"reload_completed && GET_CODE (operands[1]) == MEM && GET_CODE (XEXP
(operands[1], 0)) == PLUS"
then gcc is happy.
I have been searching the web for hours now, but I have not been able
to find what is causing this.
Does anyone have a suggestion on what might be causing this issue?
I am using FC6, and Xemacs. The GCC version on my system is gcc (GCC)
4.1.1 20061011 (Red Hat 4.1.1-30).
Thanks,
-Omar
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: error: missing terminating " character while modifying md file
2008-05-10 0:04 error: missing terminating " character while modifying md file Omar
@ 2008-05-10 0:10 ` David Daney
2008-05-10 1:09 ` David Daney
0 siblings, 1 reply; 7+ messages in thread
From: David Daney @ 2008-05-10 0:10 UTC (permalink / raw)
To: Omar; +Cc: gcc-help
Omar wrote:
> Ok, so after weeks of reading and looking at multiple .md files, I
> felt ready to give it a try and decided to create some define_split's
> on my own.
> I created a define_split RTL pattern which included this condition:
> "reload_completed
> && GET_CODE (operands[1]) == MEM
> && GET_CODE (XEXP (operands[1], 0)) == PLUS"
>
> When I try to compile it I get:
> ../../gcc/config/c816/c816.md:36 error: missing terminating " character
> ../../gcc/config/c816/c816.md:37: error: stray '\' in program
> ...
>
> If instead, I place the condition all in a single line:
> "reload_completed && GET_CODE (operands[1]) == MEM && GET_CODE (XEXP
> (operands[1], 0)) == PLUS"
> then gcc is happy.
>
> I have been searching the web for hours now, but I have not been able
> to find what is causing this.
> Does anyone have a suggestion on what might be causing this issue?
>
It has to be a valid C string. You get that error for the same reason
that you get it from this program:
----------->8---------
int f(const char *p);
int j(void)
{
return f("hello
world");
}
----------->8---------
If the condition is complex, create a macro for it in your target.h file
and use the macro in the .md file.
This is done in mips.h (see GENERATE_LL_SC) as well as I imagine other
places if you want an example.
David Daney
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: error: missing terminating " character while modifying md file
2008-05-10 0:10 ` David Daney
@ 2008-05-10 1:09 ` David Daney
2008-05-10 8:00 ` Omar
0 siblings, 1 reply; 7+ messages in thread
From: David Daney @ 2008-05-10 1:09 UTC (permalink / raw)
To: Omar; +Cc: gcc-help
David Daney wrote:
> Omar wrote:
>> Ok, so after weeks of reading and looking at multiple .md files, I
>> felt ready to give it a try and decided to create some define_split's
>> on my own.
>> I created a define_split RTL pattern which included this condition:
>> "reload_completed
>> && GET_CODE (operands[1]) == MEM
>> && GET_CODE (XEXP (operands[1], 0)) == PLUS"
>>
>> When I try to compile it I get:
>> ../../gcc/config/c816/c816.md:36 error: missing terminating " character
>> ../../gcc/config/c816/c816.md:37: error: stray '\' in program
>> ...
>>
>> If instead, I place the condition all in a single line:
>> "reload_completed && GET_CODE (operands[1]) == MEM && GET_CODE (XEXP
>> (operands[1], 0)) == PLUS"
>> then gcc is happy.
>>
>> I have been searching the web for hours now, but I have not been able
>> to find what is causing this.
>> Does anyone have a suggestion on what might be causing this issue?
>>
>
> It has to be a valid C string. You get that error for the same reason
> that you get it from this program:
Well that must not be correct, please disregard it. There are multi
line conditions all over the place.
Sorry for this mis-information.
David Daney
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: error: missing terminating " character while modifying md file
2008-05-10 1:09 ` David Daney
@ 2008-05-10 8:00 ` Omar
2008-05-13 1:52 ` Omar Torres
0 siblings, 1 reply; 7+ messages in thread
From: Omar @ 2008-05-10 8:00 UTC (permalink / raw)
To: David Daney; +Cc: gcc-help
On Fri, May 9, 2008 at 7:09 PM, David Daney <ddaney@avtrex.com> wrote:
> David Daney wrote:
>>
>> Omar wrote:
>>>
>>> Ok, so after weeks of reading and looking at multiple .md files, I
>>> felt ready to give it a try and decided to create some define_split's
>>> on my own.
>>> I created a define_split RTL pattern which included this condition:
>>> "reload_completed
>>> && GET_CODE (operands[1]) == MEM
>>> && GET_CODE (XEXP (operands[1], 0)) == PLUS"
>>>
>>> When I try to compile it I get:
>>> ../../gcc/config/c816/c816.md:36 error: missing terminating " character
>>> ../../gcc/config/c816/c816.md:37: error: stray '\' in program
>>> ...
>>>
>>> If instead, I place the condition all in a single line:
>>> "reload_completed && GET_CODE (operands[1]) == MEM && GET_CODE (XEXP
>>> (operands[1], 0)) == PLUS"
>>> then gcc is happy.
>>>
>>> I have been searching the web for hours now, but I have not been able
>>> to find what is causing this.
>>> Does anyone have a suggestion on what might be causing this issue?
>>>
>>
>> It has to be a valid C string. You get that error for the same reason
>> that you get it from this program:
>
> Well that must not be correct, please disregard it. There are multi line
> conditions all over the place.
>
> Sorry for this mis-information.
>
> David Daney
>
Yes, I followed the convention used on other ports...
That's why I am puzzled with this. I do not think there is an issue
with specific piece of code, I am thinking
that it might be related with me using an outdated tool (gcc?) or
script interpreter (sh?). I might be completly out of touch
but that is my best guess at this moment.
-Omar
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: error: missing terminating " character while modifying md file
2008-05-10 8:00 ` Omar
@ 2008-05-13 1:52 ` Omar Torres
2008-05-13 3:25 ` Tim Prince
0 siblings, 1 reply; 7+ messages in thread
From: Omar Torres @ 2008-05-13 1:52 UTC (permalink / raw)
To: gcc-help
I am still trying to find a solution for this issue. Looks like the
problem lies with the genconditions program generating incorrectly
formatted strings from the md.
This is the generated code in the gencondmd.c:
#line 36 "../../gcc/config/c816/c816.md"
{ "reload_completed^M\n\
&& GET_CODE (operands[1]) == MEM^M\n\
&& GET_CODE (XEXP (operands[1], 0)) == PLUS^M\n\
&& GET_CODE (XEXP (operands[1], 1)) == SYMBOL_REF",
__builtin_constant_p
#line 36 "../../gcc/config/c816/c816.md"
(reload_completed^M
&& GET_CODE (operands[1]) == MEM^M
&& GET_CODE (XEXP (operands[1], 0)) == PLUS^M
&& GET_CODE (XEXP (operands[1], 1)) == SYMBOL_REF)
? (int)
#line 36 "../../gcc/config/c816/c816.md"
(reload_completed^M
&& GET_CODE (operands[1]) == MEM^M
&& GET_CODE (XEXP (operands[1], 0)) == PLUS^M
&& GET_CODE (XEXP (operands[1], 1)) == SYMBOL_REF)
: -1 },
I believe the problem is mysterious ^M.
What could be causing this?
Thanks in advance for your help.
Best regards,
-Omar
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: error: missing terminating " character while modifying md file
2008-05-13 1:52 ` Omar Torres
@ 2008-05-13 3:25 ` Tim Prince
2008-05-13 4:10 ` Omar Torres
0 siblings, 1 reply; 7+ messages in thread
From: Tim Prince @ 2008-05-13 3:25 UTC (permalink / raw)
To: Omar Torres; +Cc: gcc-help
Omar Torres wrote:
>
> I believe the problem is mysterious ^M.
> What could be causing this?
>
>
>
Use of a Windows-centric editor, without attention to its options?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: error: missing terminating " character while modifying md file
2008-05-13 3:25 ` Tim Prince
@ 2008-05-13 4:10 ` Omar Torres
0 siblings, 0 replies; 7+ messages in thread
From: Omar Torres @ 2008-05-13 4:10 UTC (permalink / raw)
To: Tim Prince; +Cc: gcc-help
On Mon, May 12, 2008 at 9:55 PM, Tim Prince <tprince@myrealbox.com> wrote:
> Omar Torres wrote:
>
> >
> > I believe the problem is mysterious ^M.
> > What could be causing this?
> >
> >
> >
> >
> Use of a Windows-centric editor, without attention to its options?
>
>
Tim,
You just solved this puzzle for me.
I have always used Xemacs on a Linux system to modify the file, but
apparently the file was originally created on a windows environment (I
assume). So, based on this assumption, I used the dos2unix tool to
convert the text to be Unix compliant and now the problem is fixed!
I was assuming that Xemacs takes care of this type of conversion...
Thanks a lot!
-Omar
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-05-13 3:25 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-10 0:04 error: missing terminating " character while modifying md file Omar
2008-05-10 0:10 ` David Daney
2008-05-10 1:09 ` David Daney
2008-05-10 8:00 ` Omar
2008-05-13 1:52 ` Omar Torres
2008-05-13 3:25 ` Tim Prince
2008-05-13 4:10 ` Omar Torres
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).