[ 
https://issues.apache.org/jira/browse/TS-427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12910844#action_12910844
 ] 

John Plevyak commented on TS-427:
---------------------------------

OK, I have a test case:

#include "stdio.h"

class L {
  public:
    int i;
    L(int j) : i(j) { printf("L(%d)\n", i); }
    ~L() { if (i != 11) printf("~L(%d)\n", i); }
};

int main(int argc, char *argv[]) {
  {
    L b(argc) ;
    printf("goto\n");
    if (argc) goto l;
  }
 l:
  printf("here\n"); 
  return 5;
}


jplevyak:svn [982] % g++ x.cc ; a.out 
L(1)
goto
~L(1)
here

jplevyak:svn [983] %  clang++ x.cc ; a.out
L(1)
goto
here


> Build ATS with clang
> --------------------
>
>                 Key: TS-427
>                 URL: https://issues.apache.org/jira/browse/TS-427
>             Project: Traffic Server
>          Issue Type: Improvement
>          Components: Build
>    Affects Versions: 2.3.0
>         Environment: OS: Any; Clang --version:
> clang version 1.1 (branches/release_27)
> Target: x86_64-pc-linux-gnu
> Thread model: posix
>            Reporter: Igor Galić
>         Attachments: ats-trunk.clang-trunk.patch, ats.clang.compile.patch, 
> ats.clang.patch, ats.clang.patch, ats_clang_stuck.strace
>
>
> I've started compiling, and cleaning up traffic-server from trunk with clang, 
> with this config:
> i.ga...@phoenix ~/Projects/asf/trafficserver (svn)-[trunk:989985] % cat 
> config.notnice
> #! /bin/sh
> #
> # Created by configure
> CC="clang"; export CC
> CXX="clang"; export CXX
> CFLAGS="-fPIC -march=core2 -msse4.1 -D_FORTIFY_SOURCE=2"; export CFLAGS
> CXXFLAGS="-fPIC -march=core2 -msse4.1 -D_FORTIFY_SOURCE=2"; export CXXFLAGS
> LDFLAGS="-Wl,--as-needed -Wl,--warn-common"; export LDFLAGS
> "./configure" \
> "--enable-layout=opt" \
> "--with-user=proxy" \
> "--with-group=proxy" \
> "CC=clang" \
> "CFLAGS=-fPIC -march=core2 -msse4.1 -D_FORTIFY_SOURCE=2" \
> "LDFLAGS=-Wl,--as-needed" \
> "CXX=clang" \
> "$@"
> i.ga...@phoenix ~/Projects/asf/trafficserver (svn)-[trunk:989985] %
> Until I hit errors that seemed to include templates.
> I'm uploading the current patch for you to sanity-check and review. If it 
> makes sense, I suppose it does a bit of a clean-up.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to