c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing with whitespaces before qualifier names.
* c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing with whitespaces before qualifier names. From-SVN: r226939
This commit is contained in:
parent
28251e2ce1
commit
4ee55665cd
@ -1,3 +1,8 @@
|
|||||||
|
2015-08-17 Marek Polacek <polacek@redhat.com>
|
||||||
|
|
||||||
|
* c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
|
||||||
|
with whitespaces before qualifier names.
|
||||||
|
|
||||||
2015-08-12 Marek Polacek <polacek@redhat.com>
|
2015-08-12 Marek Polacek <polacek@redhat.com>
|
||||||
|
|
||||||
PR c++/55095
|
PR c++/55095
|
||||||
|
@ -173,7 +173,6 @@ void
|
|||||||
pp_c_cv_qualifiers (c_pretty_printer *pp, int qualifiers, bool func_type)
|
pp_c_cv_qualifiers (c_pretty_printer *pp, int qualifiers, bool func_type)
|
||||||
{
|
{
|
||||||
const char *p = pp_last_position_in_text (pp);
|
const char *p = pp_last_position_in_text (pp);
|
||||||
bool previous = false;
|
|
||||||
|
|
||||||
if (!qualifiers)
|
if (!qualifiers)
|
||||||
return;
|
return;
|
||||||
@ -185,34 +184,14 @@ pp_c_cv_qualifiers (c_pretty_printer *pp, int qualifiers, bool func_type)
|
|||||||
pp_c_whitespace (pp);
|
pp_c_whitespace (pp);
|
||||||
|
|
||||||
if (qualifiers & TYPE_QUAL_ATOMIC)
|
if (qualifiers & TYPE_QUAL_ATOMIC)
|
||||||
{
|
pp_c_ws_string (pp, "_Atomic");
|
||||||
pp_c_ws_string (pp, "_Atomic");
|
|
||||||
previous = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (qualifiers & TYPE_QUAL_CONST)
|
if (qualifiers & TYPE_QUAL_CONST)
|
||||||
{
|
pp_c_ws_string (pp, func_type ? "__attribute__((const))" : "const");
|
||||||
if (previous)
|
|
||||||
pp_c_whitespace (pp);
|
|
||||||
pp_c_ws_string (pp, func_type ? "__attribute__((const))" : "const");
|
|
||||||
previous = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (qualifiers & TYPE_QUAL_VOLATILE)
|
if (qualifiers & TYPE_QUAL_VOLATILE)
|
||||||
{
|
pp_c_ws_string (pp, func_type ? "__attribute__((noreturn))" : "volatile");
|
||||||
if (previous)
|
|
||||||
pp_c_whitespace (pp);
|
|
||||||
pp_c_ws_string (pp, func_type ? "__attribute__((noreturn))" : "volatile");
|
|
||||||
previous = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (qualifiers & TYPE_QUAL_RESTRICT)
|
if (qualifiers & TYPE_QUAL_RESTRICT)
|
||||||
{
|
pp_c_ws_string (pp, (flag_isoc99 && !c_dialect_cxx ()
|
||||||
if (previous)
|
? "restrict" : "__restrict__"));
|
||||||
pp_c_whitespace (pp);
|
|
||||||
pp_c_ws_string (pp, (flag_isoc99 && !c_dialect_cxx ()
|
|
||||||
? "restrict" : "__restrict__"));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Pretty-print T using the type-cast notation '( type-name )'. */
|
/* Pretty-print T using the type-cast notation '( type-name )'. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user