A Mac running Mac OS 10.6 (Snow Leopard), 10.7 (Lion), 10.8 (Mountain Lion) or 10.9 (Mavericks).To install Open MPI as described in this HOWTO, you'll need the following: Almost any machine purchased in the last year or two has multiple processor cores. Second, multi-core computers are the future. To me, this is the biggest motivation, since I can test software more easily on my desktop (or laptop) machine than on a cluster. * Initialization routine for this file.Why might you consider installing Open MPI? First, many programs that were designed to run distributed across several computers using MPI can now be run on a multi-core modern desktop computer. +++ -61,6 +61,7 along with GCC see the file COPYING3. */Īppend_to_statement_list_force (t, &cur_stmt_list) ĭiff -git a/gcc/c/c-parser.c b/gcc/c/c-parser.c * In grokdeclarator, distinguish syntactic contexts of declarators. +++ -63,6 +63,7 along with GCC see the file COPYING3. Warn about possibly missing braces around initializersĭiff -git a/gcc/c/c-decl.c b/gcc/c/c-decl.c +Warn when the indentation of the code does not reflect the block structureĬ ObjC C++ ObjC++ Var(warn_missing_braces) Warning LangEnabledBy(C ObjC,Wall) +C C++ Common Var(warn_misleading_indentation) Warning LangEnabledBy(C ObjC C++ ObjC++,Wpedantic, 2, 0) diff -git a/gcc/Makefile.in b/gcc/Makefile.inĭiff -git a/gcc/c-family/c.opt b/gcc/c-family/c.opt Have a command-line option (param?) to override it? (though what about, (ii) that we don't have mixed tabs/spaces in this bufferĪn issue here is how to determine (i), or if it's OK to default to 8 and (i) a consistent value for tabs in terms of spaces, or I think this is doable (at the cost of adding a field toĬpp_token, and to c_token/cp_token), provided we can assume, per-buffer, Hence to handle mixed spaces+tabs, we need some way to model "visualĬolumns". Note the transition at tab offsets, where we go from increasing visual Start of the first token in each line are actually: *characters*, so the "column" numbers emitted in diagnostics for the However within libcpp and gcc, in linemap's expanded_location and inĭiagnostic messages, the "column" numbers are actually 1-based counts of The start of the first token for each line are reported by emacs as: What does this look like in an editor? Consider emacs, which uses usesĠ-based offsets to what I call "visual columns". If this is indented using spaces&tabs with 8-space tabs, we have: This is probably the biggest can of worms.īar () /* would like to warn about this */ (C) no ChangeLog yet, though it's heavily commented. Memory allocation, but I wanted to get it right before making it fast. Instances, and there's probably a way to do this with much less dynamic (B) GTY/PCH/etc, and performance I know that it leaks visual_block Stream are normally monotonic, and using that to capture and handle I *think* that can beįixed by relying on the fact that the integer locations of the token (save/commit/rollback), and with its lexer stack. Work with the C++ FE's ideas of tentatively-consumed tokens The implementationĪssumes a single lexer consuming the token stream, so it doesn't yet (A) works with the C FE, but not with C++ yet. That said, there are several major issues with the patch as it stands: Wmisleading-indentation-6.c:15:3: warning: statement is indented as if Wmisleading-indentation-6.c: In function âfooâ: The patch successfully issues a warning on a simplified version of this: Vulnerability (where the stray goto led to the certificate-checkingĬode later in the function being dead code, skipping it with err = 0, Real meaning of the code hard to discern, and masking a security Is indented as if it's guarded by the conditional. If ((err = SSLHashSHA1.final(&hashCtx, &hashOut)) != 0) Goto fail /* MISTAKE! THIS LINE SHOULD NOT BE HERE */ If ((err = SSLHashSHA1.update(&hashCtx, &signedParams)) != 0) If ((err = SSLHashSHA1.update(&hashCtx, &serverRandom)) != 0) If ((err = SSLHashSHA1.update(&hashCtx, &clientRandom)) != 0) If ((err = ReadyHash(&SSLHashSHA1, &hashCtx)) != 0) If ((err = SSLFreeBuffer(&hashCtx)) != 0) HashOut.data = hashes + SSL_MD5_DIGEST_LEN The idea is to issue a warning when the C/C++ compiler's view of theīlock structure doesn't match that of a naive human reader of the codeįor example, CVE-2014-1266 (aka "goto fail") had: It kind-of-works, but there are some issues, so I wanted to get feedback Warning I've been experimenting with, for GCC 6. ` (2 more replies) 0 siblings, 3 replies 26+ messages in threadįrom: David Malcolm 15:08 UTC ( / raw)Īttached is a work-in-progress patch for a new Proposed new warning: -Wmisleading-indentation public inbox for help / color / mirror / Atom feed * Proposed new warning: -Wmisleading-indentation 15:08 David Malcolm
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |