Question:

I was testing some code on Coliru, and I got a strange output. I went down the code and could reproduce it with this simple
piece of code:

int main()
{
π
}

The output on g++:

clang:

For instance, using just pi (without the address-of) shows the expected result:

main.cpp:3:5: error: 'pi' was not declared in this scope
pi;
^

I tried to reproduce this on my machine, using g++ 4.9.2 and on others sites but I could not.

Is this some bug on this site, some config of these compilers ?

And why only using the address-of operator (&) shows this symbol ?

Answer:

It's a bug on the site, as the compiler's output is not properly escaped. The compiler should output
π, but that's valid HTML, producing the pi symbol you see.

website:

http://stackoverflow.com/questions/28885876/compiler-showing-pi-symbol-on-error

Compiler showing 'pi' symbol on error的更多相关文章

  1. ssh升级以及ssh: symbol lookup error: ssh: undefined symbol: EVP_aes_128_ctr错误处理

    1.解压安装openssl包:(不能卸载openssl,否则会影响系统的ssl加密库文件,除非你可以做两个软连接libcryto和libssl) # tar -zxvf openssl-1.0.1.t ...

  2. mysql: symbol lookup error: /usr/local/lib/libreadline.so.6: undefined symbol: UP

    Error Symptom: when you run $mysql -u root -p command in the linux you get an error message ” mysql: ...

  3. centos perl: symbol lookup error: /usr/local/lib64/perl5/auto/DBD/mysql/mysql.so: undefined symbol: mysql_init

    之前在安装天兔数据库监控工具lepus的时候,运行时一直报perl: symbol lookup error: /usr/local/lib64/perl5/auto/DBD/mysql/mysql. ...

  4. fastDfs V5.02 升级到 V5.08版本后,启动报错:symbol lookup error: /usr/bin/fdfs_trackerd: undefined symbol: g_current_time

    /libfastcommon-1.0.36 # ./make.sh cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o hash.o ...

  5. 由一次 symbol lookup error 引发的思考

    开发一个跨平台的项目的时候,大部分时候都是在VS下进行编码,所以也就使用了VS的解决方案来管理项目. 因为要跨平台,当时网上看scons这个工具不错,所以在linux下就使用了scons来作为编译脚本 ...

  6. ldd "symbol lookup error"问题解决

    http://www.linuxquestions.org/questions/slackware-14/symbol-lookup-error-usr-lib-libgtk-x11-2-0-so-0 ...

  7. 写动态库时遇到了symbol lookup error问题

    之前写TLPI上的代码一直是手动进行错误处理,感觉代码冗余量很大,最后还是决定使用书上的tlph_hdr.h,顺便回顾下动态库的创建/使用. 参考很久之前的一篇博客 linux上静态库和动态库的编译和 ...

  8. symbol lookup error *** , undefined symbol 错误

    在重装samba过程后遇到一些问题,使用 gdb 时产生报错: gdb: symbol lookup error: gdb: undefined symbol: PyUnicodeUCS2_FromE ...

  9. gpg: symbol lookup error

    今天使用sudo apt-get 安装包的时候,出现gpg错误,如下: gpg: symbol lookup error: /usr/local/lib/libreadline.so.6: undef ...

随机推荐

  1. Ngui使用随心记

    Ngui的一些基础使用心得! BB:首先BB一下我觉得NGUI和UGUI哪个好?我首推UGUI,先不说是官方内置,在使用的方便性上也要好很多,而且NGUI停止更新了!还有就是NGUI有BUG! Ngu ...

  2. 在Azure DevOps Server(TFS系统)中部署回退/回滚方案(Rollback)

    概述 Azure DevOps Server(之前名TFS)是微软公司实现软件研发.测试和部署一体化的全流程解决方案.在近几年的研发过程中,Azure DevOps Server 大幅增强了软件部署过 ...

  3. 什么是RDD?

    顾名思义,从字面理解RDD就是 Resillient Distributed Dataset,即弹性分布式数据集. 它是Spark提供的核心抽象. RDD在抽象上来讲是一种抽象的分布式的数据集.它是被 ...

  4. 浅谈css3长度单位rem,以及移动端布局技巧

    rem是什么? rem是css3中新增加的一个单位属性(font size of the root element),根据页面的根节点的字体大小进行转变的单位.root!!!!!!!!!根节点,也就是 ...

  5. centos7上安装cacti监控

     简介 在企业网络运维过程中,管理员必须时刻关注服务器的运行状态,如CPU.内存.磁盘空间使用情况等.为了能够及时的发现问题,尽量减少故障的发生.当网络中的设备,服务器等数量较多时,可以部署一套监控系 ...

  6. 词向量:part 2 CBoW、Skip-Gram、Negative Sampling、Hierarchical Softmax、GloVe、fastText、doc2vec

  7. 转载 Python 正则表达式入门(初级篇)

    Python 正则表达式入门(初级篇) 本文主要为没有使用正则表达式经验的新手入门所写.转载请写明出处 引子 首先说 正则表达式是什么? 正则表达式,又称正规表示式.正规表示法.正规表达式.规则表达式 ...

  8. python多进程没有锁队列范例

    假设有一些任务要完成.为了完成这项任务,将使用几个过程.所以,将保持两个队列.一个包含任务,另一个包含已完成任务的日志. 然后实例化流程来完成任务.请注意,python队列类已经同步. 这意味着,我们 ...

  9. 课程四(Convolutional Neural Networks),第二 周(Deep convolutional models: case studies) —— 2.Programming assignments : Keras Tutorial - The Happy House (not graded)

    Keras tutorial - the Happy House Welcome to the first assignment of week 2. In this assignment, you ...

  10. 关于loading

    在开发中,不可避免的会需要loading的出现,来提高用户体验, 自己在查找中,总结了两条: 1.window.onload的时候显示loading,首先loading图片是一直存在的,window. ...