From: Kenneth Zadeck <zadeck@naturalbridge.com>
To: Andrew Pinski <pinskia@gmail.com>
Cc: David Daney <ddaney@avtrex.com>,
tromey@redhat.com, Mark Mitchell <mark@codesourcery.com>,
gcc-patches <gcc-patches@gcc.gnu.org>,
"Hubicha, Jan" <jh@suse.cz>
Subject: Re: [lto] PATCH COMMITTED to fix missing semicolons.
Date: Thu, 02 Aug 2007 16:42:00 -0000 [thread overview]
Message-ID: <46B2097E.2050205@naturalbridge.com> (raw)
In-Reply-To: <de8d50360708011849s63c6adebxf5005d813c7f7448@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 747 bytes --]
Andrew Pinski wrote:
> On 8/1/07, David Daney <ddaney@avtrex.com> wrote:
>
>> #define LTO_DEBUG_INDENT(tag) do {} while(0)
>>
>
> or
> (void)0
>
> Both will force required semicolons and not allow assignments after it.
>
> Thanks,
> Andrew Pinski
>
done.
2007-08-02 Kenneth Zadeck <zadeck@naturalbridge.com>
* lto-tags.h (LTO_DEBUG_INDENT, LTO_DEBUG_INDENT_TOKEN,
LTO_DEBUG_INTEGER, LTO_DEBUG_STRING, LTO_DEBUG_TOKEN,
LTO_DEBUG_UNDENT, LTO_DEBUG_WIDE): Change "useless_function ()" to
"(void)0"
(useless_function): Removed.
2007-08-02 Kenneth Zadeck <zadeck@naturalbridge.com>
* lto-read.c (lto_read_function_body): Moved declaration of fn
outside of ifdef.
committed as revision 127165
Kenny
[-- Attachment #2: semicolon2.diff --]
[-- Type: text/x-patch, Size: 1931 bytes --]
Index: lto-tags.h
===================================================================
--- lto-tags.h (revision 127145)
+++ lto-tags.h (working copy)
@@ -520,18 +520,13 @@ extern void lto_debug_undent (struct lto
extern void lto_debug_wide (struct lto_debug_context *, const char *, HOST_WIDE_INT);
#else
-#define LTO_DEBUG_INDENT(tag) useless_function ()
-#define LTO_DEBUG_INDENT_TOKEN(value) useless_function ()
-#define LTO_DEBUG_INTEGER(tag,high,low) useless_function ()
-#define LTO_DEBUG_STRING(value,len) useless_function ()
-#define LTO_DEBUG_TOKEN(value) useless_function ()
-#define LTO_DEBUG_UNDENT() useless_function ()
-#define LTO_DEBUG_WIDE(tag,value) useless_function ()
+#define LTO_DEBUG_INDENT(tag) (void)0
+#define LTO_DEBUG_INDENT_TOKEN(value) (void)0
+#define LTO_DEBUG_INTEGER(tag,high,low) (void)0
+#define LTO_DEBUG_STRING(value,len) (void)0
+#define LTO_DEBUG_TOKEN(value) (void)0
+#define LTO_DEBUG_UNDENT() (void)0
+#define LTO_DEBUG_WIDE(tag,value) (void)0
#endif
-static inline void
-useless_function (void)
-{
-}
-
#endif /* lto-tags.h */
Index: lto/lto-read.c
===================================================================
--- lto/lto-read.c (revision 127145)
+++ lto/lto-read.c (working copy)
@@ -1433,6 +1433,8 @@ lto_read_function_body (lto_info_fd *fd,
struct lto_function_header * header
= (struct lto_function_header *) data;
struct fun_in fun_in;
+ struct function *fn = DECL_STRUCT_FUNCTION (fn_decl);
+
int32_t fields_offset = sizeof (struct lto_function_header);
int32_t fns_offset
= fields_offset + (header->num_field_decls * sizeof (lto_ref));
@@ -1468,8 +1470,6 @@ lto_read_function_body (lto_info_fd *fd,
struct input_block debug_main
= {data + debug_main_offset, 0, header->debug_main_size};
- struct function *fn = DECL_STRUCT_FUNCTION (fn_decl);
-
lto_debug_context.out = debug_out_fun;
lto_debug_context.indent = 0;
#endif
prev parent reply other threads:[~2007-08-02 16:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-01 14:16 potiential problems with parm decls Kenneth Zadeck
2007-08-01 17:23 ` Mark Mitchell
2007-08-01 17:34 ` Kenneth Zadeck
2007-08-02 0:43 ` Mark Mitchell
2007-08-02 1:10 ` Kenneth Zadeck
2007-08-02 2:50 ` Mark Mitchell
2007-08-01 20:44 ` [lto] PATCH COMMITTED " Kenneth Zadeck
2007-08-01 22:12 ` Tom Tromey
2007-08-01 22:36 ` Kenneth Zadeck
2007-08-02 1:06 ` [lto] PATCH COMMITTED to fix missing semicolons Kenneth Zadeck
2007-08-02 1:16 ` David Daney
2007-08-02 1:49 ` Andrew Pinski
2007-08-02 16:42 ` Kenneth Zadeck [this message]
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=46B2097E.2050205@naturalbridge.com \
--to=zadeck@naturalbridge.com \
--cc=ddaney@avtrex.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jh@suse.cz \
--cc=mark@codesourcery.com \
--cc=pinskia@gmail.com \
--cc=tromey@redhat.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).