From: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
To: Christian Bruel
<christian.bruel@st.com>,kyrylo.tkachov@arm.com,Ramana.Radhakrishnan@arm.com
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH 4/4] [ARM] Add attribute/pragma target fpu=
Date: Mon, 14 Sep 2015 19:50:00 -0000 [thread overview]
Message-ID: <7D8D22F4-ECEA-4BB6-A72E-2136C84EE981@gmail.com> (raw)
In-Reply-To: <55F6D9FF.4030600@st.com>
On September 14, 2015 4:30:23 PM GMT+02:00, Christian Bruel <christian.bruel@st.com> wrote:
>Finally, the final part of the patch set does the attribute target
>parsing and checking, redefines the preprocessor macros and implements
>the inlining rules.
>
>testcases and documentation included.
@@ -29501,6 +29532,8 @@
static bool
arm_valid_target_attribute_rec (tree args, struct gcc_options *opts)
{
+ int ret=true;
+
if (TREE_CODE (args) == TREE_LIST)
{
bool ret = true;
Doesn't the hunk above trigger a shadow warning? Furthermore there are missing spaces before and after the '='. And finally (no diff -p so I can only guess) why the int if the function returns a bool?
Thanks,
@@ -29518,30 +29551,35 @@
}
char *argstr = ASTRDUP (TREE_STRING_POINTER (args));
- while (argstr && *argstr != '\0')
+ char *q;
+
+ while ((q = strtok (argstr, ",")) != NULL)
{
- while (ISSPACE (*argstr))
- argstr++;
+ while (ISSPACE (*q)) ++q;
- if (!strcmp (argstr, "thumb"))
- {
+ argstr = NULL;
+ if (!strncmp (q, "thumb", 5))
opts->x_target_flags |= MASK_THUMB;
- arm_option_check_internal (opts);
- return true;
- }
- if (!strcmp (argstr, "arm"))
- {
+ else if (!strncmp (q, "arm", 3))
opts->x_target_flags &= ~MASK_THUMB;
- arm_option_check_internal (opts);
- return true;
+
+ else if (!strncmp (q, "fpu=", 4))
+ {
+ if (! opt_enum_arg_to_value (OPT_mfpu_, q+4,
+ &opts->x_arm_fpu_index, CL_TARGET))
+ {
+ error ("invalid fpu for attribute(target(\"%s\"))", q);
+ return false;
+ }
}
+ else
+ warning (0, "attribute(target(\"%s\")) is unknown", argstr);
- warning (0, "attribute(target(\"%s\")) is unknown", argstr);
- return false;
+ arm_option_check_internal (opts);
}
- return false;
+ return ret;
}
>
>thanks
>
>Christian
next prev parent reply other threads:[~2015-09-14 19:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-14 14:38 Christian Bruel
2015-09-14 19:50 ` Bernhard Reutner-Fischer [this message]
2015-09-15 10:07 ` Christian Bruel
2015-09-15 10:48 ` Christian Bruel
2015-09-18 9:13 ` Kyrill Tkachov
2015-09-21 13:46 ` Christian Bruel
2015-10-08 8:53 ` Kyrill Tkachov
2015-11-12 14:54 ` Christian Bruel
2015-11-13 11:49 ` Kyrill Tkachov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7D8D22F4-ECEA-4BB6-A72E-2136C84EE981@gmail.com \
--to=rep.dot.nop@gmail.com \
--cc=Ramana.Radhakrishnan@arm.com \
--cc=christian.bruel@st.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=kyrylo.tkachov@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).