CINXE.COM
[PATCH] __format__ attribute with function pointers - Clang Frontend - LLVM Discussion Forums
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>[PATCH] __format__ attribute with function pointers - Clang Frontend - LLVM Discussion Forums</title> <meta name="description" content="Hi, Here&#39;s a patch to fix the handling of the __format__ attribute with function pointers. Regards, Nuno"> <meta name="generator" content="Discourse 3.4.0.beta3-dev - https://github.com/discourse/discourse version 5bf5d1335680f28a8eb65c488353be9585eed08e"> <link rel="icon" type="image/png" href="https://global.discourse-cdn.com/flex015/uploads/llvm/optimized/1X/6ac54669f4b30cb07094375cbd65d24163b5b6e0_2_32x32.jpeg"> <link rel="apple-touch-icon" type="image/png" href="https://global.discourse-cdn.com/flex015/uploads/llvm/optimized/1X/6ac54669f4b30cb07094375cbd65d24163b5b6e0_2_180x180.jpeg"> <meta name="theme-color" media="all" content="#ffffff"> <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, user-scalable=yes, viewport-fit=cover"> <link rel="canonical" href="https://discourse.llvm.org/t/patch-format-attribute-with-function-pointers/10090" /> <link rel="search" type="application/opensearchdescription+xml" href="https://discourse.llvm.org/opensearch.xml" title="LLVM Discussion Forums Search"> <link href="https://sea1.discourse-cdn.com/flex015/stylesheets/color_definitions_base__2_97eb2726adc90ea788946f97df0eff9e96d11736.css?__ws=discourse.llvm.org" media="all" rel="stylesheet" class="light-scheme"/> <link href="https://sea1.discourse-cdn.com/flex015/stylesheets/desktop_689c3233f5745de1f03ddcb29a710e66164435f2.css?__ws=discourse.llvm.org" media="all" rel="stylesheet" data-target="desktop" /> <link href="https://sea1.discourse-cdn.com/flex015/stylesheets/chat_689c3233f5745de1f03ddcb29a710e66164435f2.css?__ws=discourse.llvm.org" media="all" rel="stylesheet" data-target="chat" /> <link href="https://sea1.discourse-cdn.com/flex015/stylesheets/checklist_689c3233f5745de1f03ddcb29a710e66164435f2.css?__ws=discourse.llvm.org" media="all" rel="stylesheet" data-target="checklist" /> <link href="https://sea1.discourse-cdn.com/flex015/stylesheets/discourse-adplugin_689c3233f5745de1f03ddcb29a710e66164435f2.css?__ws=discourse.llvm.org" media="all" rel="stylesheet" data-target="discourse-adplugin" /> <link href="https://sea1.discourse-cdn.com/flex015/stylesheets/discourse-ai_689c3233f5745de1f03ddcb29a710e66164435f2.css?__ws=discourse.llvm.org" media="all" rel="stylesheet" data-target="discourse-ai" /> <link href="https://sea1.discourse-cdn.com/flex015/stylesheets/discourse-akismet_689c3233f5745de1f03ddcb29a710e66164435f2.css?__ws=discourse.llvm.org" media="all" rel="stylesheet" data-target="discourse-akismet" /> <link href="https://sea1.discourse-cdn.com/flex015/stylesheets/discourse-cakeday_689c3233f5745de1f03ddcb29a710e66164435f2.css?__ws=discourse.llvm.org" media="all" rel="stylesheet" data-target="discourse-cakeday" /> <link href="https://sea1.discourse-cdn.com/flex015/stylesheets/discourse-calendar_689c3233f5745de1f03ddcb29a710e66164435f2.css?__ws=discourse.llvm.org" media="all" rel="stylesheet" data-target="discourse-calendar" /> <link href="https://sea1.discourse-cdn.com/flex015/stylesheets/discourse-chat-integration_689c3233f5745de1f03ddcb29a710e66164435f2.css?__ws=discourse.llvm.org" media="all" rel="stylesheet" data-target="discourse-chat-integration" /> <link href="https://sea1.discourse-cdn.com/flex015/stylesheets/discourse-details_689c3233f5745de1f03ddcb29a710e66164435f2.css?__ws=discourse.llvm.org" media="all" rel="stylesheet" data-target="discourse-details" /> <link href="https://sea1.discourse-cdn.com/flex015/stylesheets/discourse-lazy-videos_689c3233f5745de1f03ddcb29a710e66164435f2.css?__ws=discourse.llvm.org" media="all" rel="stylesheet" data-target="discourse-lazy-videos" /> <link href="https://sea1.discourse-cdn.com/flex015/stylesheets/discourse-local-dates_689c3233f5745de1f03ddcb29a710e66164435f2.css?__ws=discourse.llvm.org" media="all" rel="stylesheet" data-target="discourse-local-dates" /> <link href="https://sea1.discourse-cdn.com/flex015/stylesheets/discourse-narrative-bot_689c3233f5745de1f03ddcb29a710e66164435f2.css?__ws=discourse.llvm.org" media="all" rel="stylesheet" data-target="discourse-narrative-bot" /> <link href="https://sea1.discourse-cdn.com/flex015/stylesheets/discourse-policy_689c3233f5745de1f03ddcb29a710e66164435f2.css?__ws=discourse.llvm.org" media="all" rel="stylesheet" data-target="discourse-policy" /> <link href="https://sea1.discourse-cdn.com/flex015/stylesheets/discourse-presence_689c3233f5745de1f03ddcb29a710e66164435f2.css?__ws=discourse.llvm.org" media="all" rel="stylesheet" data-target="discourse-presence" /> <link href="https://sea1.discourse-cdn.com/flex015/stylesheets/discourse-solved_689c3233f5745de1f03ddcb29a710e66164435f2.css?__ws=discourse.llvm.org" media="all" rel="stylesheet" data-target="discourse-solved" /> <link href="https://sea1.discourse-cdn.com/flex015/stylesheets/discourse-templates_689c3233f5745de1f03ddcb29a710e66164435f2.css?__ws=discourse.llvm.org" media="all" rel="stylesheet" data-target="discourse-templates" /> <link href="https://sea1.discourse-cdn.com/flex015/stylesheets/discourse-topic-voting_689c3233f5745de1f03ddcb29a710e66164435f2.css?__ws=discourse.llvm.org" media="all" rel="stylesheet" data-target="discourse-topic-voting" /> <link href="https://sea1.discourse-cdn.com/flex015/stylesheets/footnote_689c3233f5745de1f03ddcb29a710e66164435f2.css?__ws=discourse.llvm.org" media="all" rel="stylesheet" data-target="footnote" /> <link href="https://sea1.discourse-cdn.com/flex015/stylesheets/hosted-site_689c3233f5745de1f03ddcb29a710e66164435f2.css?__ws=discourse.llvm.org" media="all" rel="stylesheet" data-target="hosted-site" /> <link href="https://sea1.discourse-cdn.com/flex015/stylesheets/poll_689c3233f5745de1f03ddcb29a710e66164435f2.css?__ws=discourse.llvm.org" media="all" rel="stylesheet" data-target="poll" /> <link href="https://sea1.discourse-cdn.com/flex015/stylesheets/spoiler-alert_689c3233f5745de1f03ddcb29a710e66164435f2.css?__ws=discourse.llvm.org" media="all" rel="stylesheet" data-target="spoiler-alert" /> <link href="https://sea1.discourse-cdn.com/flex015/stylesheets/chat_desktop_689c3233f5745de1f03ddcb29a710e66164435f2.css?__ws=discourse.llvm.org" media="all" rel="stylesheet" data-target="chat_desktop" /> <link href="https://sea1.discourse-cdn.com/flex015/stylesheets/discourse-ai_desktop_689c3233f5745de1f03ddcb29a710e66164435f2.css?__ws=discourse.llvm.org" media="all" rel="stylesheet" data-target="discourse-ai_desktop" /> <link href="https://sea1.discourse-cdn.com/flex015/stylesheets/discourse-calendar_desktop_689c3233f5745de1f03ddcb29a710e66164435f2.css?__ws=discourse.llvm.org" media="all" rel="stylesheet" data-target="discourse-calendar_desktop" /> <link href="https://sea1.discourse-cdn.com/flex015/stylesheets/discourse-topic-voting_desktop_689c3233f5745de1f03ddcb29a710e66164435f2.css?__ws=discourse.llvm.org" media="all" rel="stylesheet" data-target="discourse-topic-voting_desktop" /> <link href="https://sea1.discourse-cdn.com/flex015/stylesheets/poll_desktop_689c3233f5745de1f03ddcb29a710e66164435f2.css?__ws=discourse.llvm.org" media="all" rel="stylesheet" data-target="poll_desktop" /> <link href="https://sea1.discourse-cdn.com/flex015/stylesheets/desktop_theme_2_3ca050d7322651252d0449fb94b1704dbb200528.css?__ws=discourse.llvm.org" media="all" rel="stylesheet" data-target="desktop_theme" data-theme-id="2" data-theme-name="light"/> <script defer="" src="https://sea1.discourse-cdn.com/flex015/theme-javascripts/454dcd92185463cfae2259a66f283eea4ad30c97.js?__ws=discourse.llvm.org" data-theme-id="5" nonce="QrZZuSa3rAbdAStXG7g4EZ1w7"></script> <link rel="alternate nofollow" type="application/rss+xml" title="RSS feed of '[PATCH] __format__ attribute with function pointers'" href="https://discourse.llvm.org/t/patch-format-attribute-with-function-pointers/10090.rss" /> <meta property="og:site_name" content="LLVM Discussion Forums" /> <meta property="og:type" content="website" /> <meta name="twitter:card" content="summary" /> <meta name="twitter:image" content="https://global.discourse-cdn.com/flex015/uploads/llvm/original/1X/6ac54669f4b30cb07094375cbd65d24163b5b6e0.jpeg" /> <meta property="og:image" content="https://global.discourse-cdn.com/flex015/uploads/llvm/original/1X/6ac54669f4b30cb07094375cbd65d24163b5b6e0.jpeg" /> <meta property="og:url" content="https://discourse.llvm.org/t/patch-format-attribute-with-function-pointers/10090" /> <meta name="twitter:url" content="https://discourse.llvm.org/t/patch-format-attribute-with-function-pointers/10090" /> <meta property="og:title" content="[PATCH] __format__ attribute with function pointers" /> <meta name="twitter:title" content="[PATCH] __format__ attribute with function pointers" /> <meta property="og:description" content="Hi, Here's a patch to fix the handling of the __format__ attribute with function pointers. Regards, Nuno" /> <meta name="twitter:description" content="Hi, Here's a patch to fix the handling of the __format__ attribute with function pointers. Regards, Nuno" /> <meta property="og:article:section" content="Clang Frontend" /> <meta property="og:article:section:color" content="ED207B" /> <meta property="article:published_time" content="2008-03-14T17:54:21+00:00" /> <meta property="og:ignore_canonical" content="true" /> </head> <body class="crawler browser-update"> <header> <a href="/"> LLVM Discussion Forums </a> </header> <div id="main-outlet" class="wrap" role="main"> <div id="topic-title"> <h1> <a href="/t/patch-format-attribute-with-function-pointers/10090">[PATCH] __format__ attribute with function pointers</a> </h1> <div class="topic-category" itemscope itemtype="http://schema.org/BreadcrumbList"> <span itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"> <a href="/c/clang/6" class="badge-wrapper bullet" itemprop="item"> <span class='badge-category-bg' style='background-color: #ED207B'></span> <span class='badge-category clear-badge'> <span class='category-name' itemprop='name'>Clang Frontend</span> </span> </a> <meta itemprop="position" content="1" /> </span> </div> </div> <div itemscope itemtype='http://schema.org/DiscussionForumPosting'> <meta itemprop='headline' content='[PATCH] __format__ attribute with function pointers'> <link itemprop='url' href='https://discourse.llvm.org/t/patch-format-attribute-with-function-pointers/10090'> <meta itemprop='datePublished' content='2008-03-14T17:54:21Z'> <meta itemprop='articleSection' content='Clang Frontend'> <meta itemprop='keywords' content=''> <div itemprop='publisher' itemscope itemtype="http://schema.org/Organization"> <meta itemprop='name' content='LLVM Foundation'> <div itemprop='logo' itemscope itemtype="http://schema.org/ImageObject"> <meta itemprop='url' content='https://global.discourse-cdn.com/flex015/uploads/llvm/original/1X/6ac54669f4b30cb07094375cbd65d24163b5b6e0.jpeg'> </div> </div> <div id='post_1' class='topic-body crawler-post'> <div class='crawler-post-meta'> <span class="creator" itemprop="author" itemscope itemtype="http://schema.org/Person"> <a itemprop="url" href='https://discourse.llvm.org/u/nlopes'><span itemprop='name'>nlopes</span></a> </span> <link itemprop="mainEntityOfPage" href="https://discourse.llvm.org/t/patch-format-attribute-with-function-pointers/10090"> <span class="crawler-post-infos"> <time datetime='2008-03-14T17:54:21Z' class='post-time'> March 14, 2008, 5:54pm </time> <meta itemprop='dateModified' content='2008-03-14T17:54:21Z'> <span itemprop='position'>1</span> </span> </div> <div class='post' itemprop='text'> <p>Hi,</p> <p>Here's a patch to fix the handling of the __format__ attribute with function pointers.</p> <p>Regards,<br> Nuno</p> </div> <div itemprop="interactionStatistic" itemscope itemtype="http://schema.org/InteractionCounter"> <meta itemprop="interactionType" content="http://schema.org/LikeAction"/> <meta itemprop="userInteractionCount" content="0" /> <span class='post-likes'></span> </div> </div> </div> <div id="related-topics" class="more-topics__list " role="complementary" aria-labelledby="related-topics-title"> <h3 id="related-topics-title" class="more-topics__list-title"> Related topics </h3> <div class="topic-list-container" itemscope itemtype='http://schema.org/ItemList'> <meta itemprop='itemListOrder' content='http://schema.org/ItemListOrderDescending'> <table class='topic-list'> <thead> <tr> <th>Topic</th> <th></th> <th class="replies">Replies</th> <th class="views">Views</th> <th>Activity</th> </tr> </thead> <tbody> <tr class="topic-list-item" id="topic-list-item-10091"> <td class="main-link" itemprop='itemListElement' itemscope itemtype='http://schema.org/ListItem'> <meta itemprop='position' content='1'> <span class="link-top-line"> <a itemprop='url' href='https://discourse.llvm.org/t/patch-format-attribute-with-function-pointers/10091' class='title raw-link raw-topic-link'>[PATCH] __format__ attribute with function pointers</a> </span> <div class="link-bottom-line"> <a href='/c/clang/6' class='badge-wrapper bullet'> <span class='badge-category-bg' style='background-color: #ED207B'></span> <span class='badge-category clear-badge'> <span class='category-name'>Clang Frontend</span> </span> </a> <div class="discourse-tags"> </div> </div> </td> <td class="replies"> <span class='posts' title='posts'>4</span> </td> <td class="views"> <span class='views' title='views'>87</span> </td> <td> March 25, 2008 </td> </tr> <tr class="topic-list-item" id="topic-list-item-31071"> <td class="main-link" itemprop='itemListElement' itemscope itemtype='http://schema.org/ListItem'> <meta itemprop='position' content='2'> <span class="link-top-line"> <a itemprop='url' href='https://discourse.llvm.org/t/feature-request-support-format-attribute-for-non-variadic-functions/31071' class='title raw-link raw-topic-link'>feature request: support format attribute for non-variadic functions</a> </span> <div class="link-bottom-line"> <a href='/c/clang/6' class='badge-wrapper bullet'> <span class='badge-category-bg' style='background-color: #ED207B'></span> <span class='badge-category clear-badge'> <span class='category-name'>Clang Frontend</span> </span> </a> <div class="discourse-tags"> </div> </div> </td> <td class="replies"> <span class='posts' title='posts'>0</span> </td> <td class="views"> <span class='views' title='views'>93</span> </td> <td> February 15, 2014 </td> </tr> <tr class="topic-list-item" id="topic-list-item-29199"> <td class="main-link" itemprop='itemListElement' itemscope itemtype='http://schema.org/ListItem'> <meta itemprop='position' content='3'> <span class="link-top-line"> <a itemprop='url' href='https://discourse.llvm.org/t/accepting-in-format-string-with-attribute-format/29199' class='title raw-link raw-topic-link'>Accepting "%@" in format string with __attribute__ format</a> </span> <div class="link-bottom-line"> <a href='/c/clang/using-clang/47' class='badge-wrapper bullet'> <span class='badge-category-bg' style='background-color: #F7941D'></span> <span class='badge-category clear-badge'> <span class='category-name'>Using Clang</span> </span> </a> <div class="discourse-tags"> </div> </div> </td> <td class="replies"> <span class='posts' title='posts'>0</span> </td> <td class="views"> <span class='views' title='views'>86</span> </td> <td> September 19, 2013 </td> </tr> <tr class="topic-list-item" id="topic-list-item-83076"> <td class="main-link" itemprop='itemListElement' itemscope itemtype='http://schema.org/ListItem'> <meta itemprop='position' content='4'> <span class="link-top-line"> <a itemprop='url' href='https://discourse.llvm.org/t/rfc-format-attribute-attribute-format-like/83076' class='title raw-link raw-topic-link'>[RFC] Format attribute: `__attribute__((format_like(...)))`</a> </span> <div class="link-bottom-line"> <a href='/c/clang/6' class='badge-wrapper bullet'> <span class='badge-category-bg' style='background-color: #ED207B'></span> <span class='badge-category clear-badge'> <span class='category-name'>Clang Frontend</span> </span> </a> <div class="discourse-tags"> <a href='https://discourse.llvm.org/tag/clang' class='discourse-tag'>clang</a> </div> </div> </td> <td class="replies"> <span class='posts' title='posts'>6</span> </td> <td class="views"> <span class='views' title='views'>293</span> </td> <td> November 26, 2024 </td> </tr> <tr class="topic-list-item" id="topic-list-item-47044"> <td class="main-link" itemprop='itemListElement' itemscope itemtype='http://schema.org/ListItem'> <meta itemprop='position' content='5'> <span class="link-top-line"> <a itemprop='url' href='https://discourse.llvm.org/t/clang-format-c-attribute-specifiers/47044' class='title raw-link raw-topic-link'>clang-format: C++ attribute specifiers</a> </span> <div class="link-bottom-line"> <a href='/c/clang/using-clang/47' class='badge-wrapper bullet'> <span class='badge-category-bg' style='background-color: #F7941D'></span> <span class='badge-category clear-badge'> <span class='category-name'>Using Clang</span> </span> </a> <div class="discourse-tags"> </div> </div> </td> <td class="replies"> <span class='posts' title='posts'>0</span> </td> <td class="views"> <span class='views' title='views'>88</span> </td> <td> December 5, 2017 </td> </tr> </tbody> </table> </div> </div> </div> <footer class="container wrap"> <nav class='crawler-nav'> <ul> <li itemscope itemtype='http://schema.org/SiteNavigationElement'> <span itemprop='name'> <a href='/' itemprop="url">Home </a> </span> </li> <li itemscope itemtype='http://schema.org/SiteNavigationElement'> <span itemprop='name'> <a href='/categories' itemprop="url">Categories </a> </span> </li> <li itemscope itemtype='http://schema.org/SiteNavigationElement'> <span itemprop='name'> <a href='/guidelines' itemprop="url">Guidelines </a> </span> </li> <li itemscope itemtype='http://schema.org/SiteNavigationElement'> <span itemprop='name'> <a href='/tos' itemprop="url">Terms of Service </a> </span> </li> <li itemscope itemtype='http://schema.org/SiteNavigationElement'> <span itemprop='name'> <a href='/privacy' itemprop="url">Privacy Policy </a> </span> </li> </ul> </nav> <p class='powered-by-link'>Powered by <a href="https://www.discourse.org">Discourse</a>, best viewed with JavaScript enabled</p> </footer> <div class="buorg"><div>Unfortunately, <a href="https://www.discourse.org/faq/#browser">your browser is unsupported</a>. Please <a href="https://browsehappy.com">switch to a supported browser</a> to view rich content, log in and reply.</div></div> </body> </html>