]> gcc.gnu.org Git - gcc.git/blame - gcc/c/ChangeLog
re PR tree-optimization/71872 (ICE in inchash::add_expr, at tree.c:7782 - OEP_ADDRESS...
[gcc.git] / gcc / c / ChangeLog
CommitLineData
8c681247
TS
12016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2
3 * c-parser.c (c_parser_generic_selection): Make type of variable
4 auto_vec.
5 (c_parser_omp_declare_simd): Likewise.
6
bf4fa671
TS
72016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
8
9 * c-decl.c (struct c_struct_parse_info): Change member types
10 from vec to auto_vec.
11 (start_struct): Adjust.
12 (finish_struct): Likewise.
13
557e8c49
JJ
142016-07-02 Jakub Jelinek <jakub@redhat.com>
15
16 PR c/71719
17 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
18
54d19c3b
TS
192016-06-29 Thomas Schwinge <thomas@codesourcery.com>
20
21 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
22 Move pragma context checking into...
23 (c_parser_omp_cancellation_point): ... here, and improve
24 diagnostic messages.
25 * c-typeck.c (c_finish_omp_cancel)
26 (c_finish_omp_cancellation_point): Improve diagnostic messages.
27
152ef731
JJ
282016-06-29 Jakub Jelinek <jakub@redhat.com>
29
30 PR c/71685
31 * c-typeck.c (c_build_qualified_type): Don't clear
32 C_TYPE_INCOMPLETE_VARS for the main variant.
33
342016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
35
36 PR c/71552
37 * c-typeck.c (output_init_element): Diagnose incompatible types
38 before non-constant initializers.
39
e9ac1f86
JJ
402016-06-28 Jakub Jelinek <jakub@redhat.com>
41
42 * Make-lang.in: Don't cat ../stage_current if it does not exist.
43
277d7ee0
AK
442016-06-23 Andi Kleen <ak@linux.intel.com>
45
46 * Make-lang.in: Add support for autofdo.
47
1a4f11c8
DM
482016-06-22 David Malcolm <dmalcolm@redhat.com>
49
50 PR c/70339
51 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
52 (implicit_decl_warning): When issuing warnings for implicit
53 declarations, attempt to provide a suggestion via
54 lookup_name_fuzzy.
55 (undeclared_variable): Likewise when issuing errors.
56 (lookup_name_in_scope): Likewise.
57 (struct edit_distance_traits<cpp_hashnode *>): New struct.
58 (best_macro_match): New typedef.
59 (find_closest_macro_cpp_cb): New function.
60 (lookup_name_fuzzy): New function.
61 * c-parser.c: Include gcc-rich-location.h.
62 (c_token_starts_typename): Split out case CPP_KEYWORD into...
63 (c_keyword_starts_typename): ...this new function.
64 (c_parser_declaration_or_fndef): When issuing errors about
65 missing "struct" etc, add a fixit. For other kinds of errors,
66 attempt to provide a suggestion via lookup_name_fuzzy.
67 (c_parser_parms_declarator): When looking ahead to detect typos in
68 type names, also reject CPP_KEYWORD.
69 (c_parser_parameter_declaration): When issuing errors about
70 unknown type names, attempt to provide a suggestion via
71 lookup_name_fuzzy.
72 * c-tree.h (c_keyword_starts_typename): New prototype.
73
5a578671
JM
742016-06-20 Joseph Myers <joseph@codesourcery.com>
75
76 PR c/71601
77 * c-typeck.c (build_conditional_expr): Return error_mark_node if
78 c_common_type returns error_mark_node.
79
aa0db437
MS
802016-06-19 Martin Sebor <msebor@redhat.com>
81
82 PR c/69507
83 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
84 __alignof__ (expression).
85
6a3f203c
DM
862016-06-14 David Malcolm <dmalcolm@redhat.com>
87
88 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
89
264757fb
DM
902016-06-14 David Malcolm <dmalcolm@redhat.com>
91
92 * c-typeck.c (build_component_ref): Simplify fixit code by
93 using gcc_rich_location::add_fixit_misspelled_id.
94 (set_init_label): Likewise.
95
f7e4f2e3
DM
962016-06-13 David Malcolm <dmalcolm@redhat.com>
97
98 * c-parser.c (c_parser_initelt): Provide location of name for new
99 location_t param of set_init_label.
100 * c-tree.h (set_init_label): Add location_t param.
101 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
102 param and use it when issuing error messages about unrecognized
103 field names. Attempt to provide a fixit hint if appropriate,
104 otherwise update the error message to provide the type name.
105
4b1ffdb1
TS
1062016-06-10 Thomas Schwinge <thomas@codesourcery.com>
107
108 PR c/71381
109 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
110 Loosen checking.
111
44a845ca
MS
1122016-06-08 Martin Sebor <msebor@redhat.com>
113 Jakub Jelinek <jakub@redhat.com>
114
115 PR c++/70507
116 PR c/68120
117 * c-typeck.c (convert_arguments): Don't promote last argument
118 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
119
92a5f2ba
MP
1202016-06-08 Marek Polacek <polacek@redhat.com>
121
122 PR c/71418
123 * c-decl.c (grokdeclarator): Check TYPE_P.
124
08203f73
MP
125 PR c/71426
126 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
127 code.
128
6ffd47b7
DM
1292016-06-07 David Malcolm <dmalcolm@redhat.com>
130
131 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
132 and structure element reference, capture the location of the
133 element name token and pass it to build_component_ref.
134 (c_parser_postfix_expression_after_primary): Likewise for
135 structure element dereference.
136 (c_parser_omp_variable_list): Likewise for
137 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
138 * c-tree.h (build_component_ref): Add location_t param.
139 * c-typeck.c (build_component_ref): Add location_t param
140 COMPONENT_LOC. Use it, if available, when issuing hints about
141 mispelled member names to provide a fixit replacement hint.
142
1f40cff3
MP
1432016-06-06 Marek Polacek <polacek@redhat.com>
144
145 PR c/71362
146 * c-parser.c (c_parser_direct_declarator): Set location.
147
5545a907
MP
1482016-06-06 Marek Polacek <polacek@redhat.com>
149
150 * c-typeck.c (comptypes_internal): Handle comparisons of
151 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
152 TYPE_REF_CAN_ALIAS_ALL.
153
b605f663
CLT
1542016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
155
156 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
157 arguments as addressable when async clause exists.
158
00631022
JJ
1592016-05-30 Jakub Jelinek <jakub@redhat.com>
160
161 PR c++/71349
162 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
163 when combined with target construct.
164
7211a097
JJ
1652016-05-26 Jakub Jelinek <jakub@redhat.com>
166
167 * c-parser.c (c_parser_omp_clause_schedule): Warn if
168 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
169
95efe6b6
MP
1702016-05-25 Marek Polacek <polacek@redhat.com>
171
172 PR c/71265
173 * c-decl.c (c_make_fname_decl): Don't check seen_error.
174
a23faf7a
MP
175 PR c/71266
176 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
177
e46c7770
CP
1782016-05-24 Cesar Philippidis <cesar@codesourcery.com>
179
180 * c-parser.c (c_parser_oacc_declare): Add support for
181 GOMP_MAP_FIRSTPRIVATE_POINTER.
182 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
183 argument with enum c_omp_region_type ort.
184 (handle_omp_array_sections): Likewise. Update call to
185 handle_omp_array_sections_1.
186 (c_finish_omp_clauses): Add specific errors and warning messages for
187 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
188 call to handle_omp_array_sections.
189
a04e69c0
TS
1902016-05-24 Thomas Schwinge <thomas@codesourcery.com>
191
192 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
193
f17a223d
RB
1942016-05-24 Richard Biener <rguenther@suse.de>
195
196 PR middle-end/70434
197 PR c/69504
198 * c-typeck.c (build_array_ref): Do not complain about indexing
199 non-lvalue vectors. Adjust for function name change.
200
79063edd
MS
2012016-05-20 Martin Sebor <msebor@redhat.com>
202
203 PR c/71115
204 * c-typeck.c (error_init): Use
205 expansion_point_location_if_in_system_header.
206 (warning_init): Same.
207
8a40fef3
DM
2082016-05-19 David Malcolm <dmalcolm@redhat.com>
209
210 PR c/71171
211 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
212 in error-handling.
213 (c_parser_postfix_expression): Likewise.
214 * c-tree.h (c_expr::set_error): New method.
215 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
216 that result's range is initialized.
217
e9892350
JG
2182016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
219
220 * c-typeck.c (parser_build_unary_op): Fix formatting.
221
8fad45f5
MW
2222016-05-16 Matthew Wahab <matthew.wahab@arm.com>
223
224 * c-decl.c (grokdeclarator): Remove errmsg and use of
225 targetm.invalid_return_type.
226 (grokparms): Remove errmsg and use of
227 targetm.invalid_parameter_type.
228
aa4b467b
JM
2292016-05-13 Joseph Myers <joseph@codesourcery.com>
230
231 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
232 function return type.
233
4f2e1536
MP
2342016-05-12 Marek Polacek <polacek@redhat.com>
235
236 PR c/70756
237 * c-decl.c (build_compound_literal): Pass LOC down to
238 c_incomplete_type_error.
239 * c-tree.h (require_complete_type): Adjust declaration.
240 (c_incomplete_type_error): Likewise.
241 * c-typeck.c (require_complete_type): Add location parameter, pass it
242 down to c_incomplete_type_error.
243 (c_incomplete_type_error): Add location parameter, pass it down to
244 error_at.
245 (build_component_ref): Pass location down to c_incomplete_type_error.
246 (default_conversion): Pass location down to require_complete_type.
247 (build_array_ref): Likewise.
248 (build_function_call_vec): Likewise.
249 (convert_arguments): Likewise.
250 (build_unary_op): Likewise.
251 (build_c_cast): Likewise.
252 (build_modify_expr): Likewise.
253 (convert_for_assignment): Likewise.
254 (c_finish_omp_clauses): Likewise.
255
d6e83a8d
MM
2562016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
257
258 PR c/43651
259 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
260 is enabled.
261 * c-errors.c (pedwarn_c90): Return true if warned.
262 * c-tree.h (pedwarn_c90): Change return type to bool.
263 (enum c_declspec_word): Add new enumerator cdw_atomic.
264
5c3a10fb
MP
2652016-05-11 Marek Polacek <polacek@redhat.com>
266
267 PR c++/71024
268 * c-decl.c (diagnose_mismatched_decls): Factor out code to
269 diagnose_mismatched_attributes and call it.
270
cf68d92c
MP
2712016-05-10 Marek Polacek <polacek@redhat.com>
272
273 PR c/70255
274 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
275 on a declaration following the definition.
276
351f85c5
JJ
2772016-05-05 Jakub Jelinek <jakub@redhat.com>
278
279 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
280 parse it through to c_parser_c99_block_statement.
281 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
282 caller.
283
deef7113
MP
2842016-05-04 Marek Polacek <polacek@redhat.com>
285
286 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
287 OPT_Wdangling_else.
288
de55efd5
MP
2892016-05-04 Marek Polacek <polacek@redhat.com>
290
291 PR c/48778
292 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
293 for macro expansions.
294
79ce98bc
MP
2952016-05-03 Marek Polacek <polacek@redhat.com>
296
297 PR c/70859
298 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
299 check_builtin_function_arguments.
300
fb2647aa
RB
3012016-05-03 Richard Biener <rguenther@suse.de>
302
303 * Make-lang.in (cc1-checksum.c): For stage-final re-use
304 the checksum from the previous stage.
305
77886428
CP
3062016-05-02 Cesar Philippidis <cesar@codesourcery.com>
307
308 * c-parser.c (c_parser_oacc_all_clauses): Update call to
309 c_finish_omp_clauses.
310 (c_parser_omp_all_clauses): Likewise.
311 (c_parser_oacc_cache): Likewise.
312 (c_parser_oacc_loop): Likewise.
313 (omp_split_clauses): Likewise.
314 (c_parser_omp_declare_target): Likewise.
315 (c_parser_cilk_all_clauses): Likewise.
316 (c_parser_cilk_for): Likewise.
317 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
318 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
319
7176a4a0
MP
3202016-05-02 Marek Polacek <polacek@redhat.com>
321
322 PR c/70851
323 * c-decl.c (grokdeclarator): Diagnose when array's size has an
324 incomplete type.
325
e7ff0319
CP
3262016-04-29 Cesar Philippidis <cesar@codesourcery.com>
327
328 PR middle-end/70626
329 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
330 OACC_LOOP_CLAUSE_MASK.
331 (c_parser_oacc_kernels_parallel): Update call to
332 c_oacc_split_loop_clauses.
333
9f405ce1
AM
3342016-04-28 Andrew MacLeod <amacleod@redhat.com>
335
336 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
337 argument to build_modify_expr in two cases.
338
c1e1f433
BS
3392016-04-27 Bernd Schmidt <bschmidt@redhat.com>
340
341 * c-parser.c (c_parser_postfix_expression_after_primary): Call
342 warn_for_memset instead of warning directly here.
343
2448a956
MP
3442016-04-26 Marek Polacek <polacek@redhat.com>
345
346 PR c/67784
347 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
348 out of ...
349 (c_parser_for_statement): ... here.
350 (c_parser_if_statement): Use it.
351 (c_parser_switch_statement): Use it.
352 (c_parser_while_statement): Use it.
353
b02a5e26
MP
354 PR c/70791
355 * c-decl.c (pushdecl): Pass LOCUS down to warning.
356
477d4906
IV
3572016-04-20 Ilya Verbin <ilya.verbin@intel.com>
358
359 PR c++/69363
360 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
361 instead of c_finish_cilk_clauses.
362 * c-tree.h (c_finish_omp_clauses): Add new default argument.
363 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
364 floating-point variables in the linear clause for Cilk Plus.
365
fe37c7af
MM
3662016-04-18 Michael Matz <matz@suse.de>
367
368 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
369 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
370
949505a9
MP
3712016-04-15 Marek Polacek <polacek@redhat.com>
372
373 PR c/70671
374 * c-typeck.c (build_unary_op): Pass location down to error and
375 warning call.
376
dda1bf61
JJ
3772016-04-15 Jakub Jelinek <jakub@redhat.com>
378
379 PR c/70436
380 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
381 where needed.
382 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
383 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
384 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
385 Adjust c_parser_pragma callers.
386 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
387 caller.
388 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
389 c_parser_statement.
390 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
391 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
392 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
393 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
394 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
395 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
396 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
397 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
398 down where needed.
399 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
400 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
401 calls.
402
99cd9857
MP
4032016-04-13 Marek Polacek <polacek@redhat.com>
404
405 PR c/70436
406 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
407 adjust callers.
408 (c_parser_statement): Likewise.
409 (c_parser_c99_block_statement): Likewise.
410 (c_parser_while_statement): Likewise.
411 (c_parser_for_statement): Likewise.
412 (c_parser_if_body): Don't set IF_P here.
413 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
414 about dangling else here.
415 * c-tree.h (c_finish_if_stmt): Adjust declaration.
416 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
417 warn about dangling else here.
418
f13355da
MP
4192016-04-04 Marek Polacek <polacek@redhat.com>
420
421 PR c/70307
422 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
423
5fde6a45
MP
4242016-03-31 Marek Polacek <polacek@redhat.com>
425
426 PR c/70297
427 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
428
4bbf545b
DM
4292016-03-18 David Malcolm <dmalcolm@redhat.com>
430
431 PR c/70281
432 * c-parser.c (c_parser_postfix_expression): Set the source range
433 for uses of "__builtin_types_compatible_p".
434
fcc2b74f
JJ
4352016-03-17 Jakub Jelinek <jakub@redhat.com>
436
437 PR c/70280
438 * c-typeck.c (composite_type): Don't count void_list_node
439 into len, if the list is terminated by void_list_node, start
440 with void_list_node instead of NULL for newargs. Stop
441 at void_list_node.
442
ab4c578f
MP
4432016-03-16 Marek Polacek <polacek@redhat.com>
444
445 PR c/70093
446 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
447 nested functions returning VM types.
448
96b3c82d
CP
4492016-03-09 Cesar Philippidis <cesar@codesourcery.com>
450
451 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
452 when calling c_finish_omp_clauses.
453
29b9828f
BS
4542016-03-04 Bernd Schmidt <bschmidt@redhat.com>
455
456 PR c/69824
457 * c-decl.c (get_parm_info): Don't queue implicit function declarations
458 for later.
459
7ff6ca38
MP
4602016-03-04 Marek Polacek <polacek@redhat.com>
461
462 PR c/69798
463 * c-parser.c (c_parser_postfix_expression): Call
464 c_parser_cast_expression rather than c_parser_postfix_expression.
465
686e2237
JJ
4662016-03-01 Jakub Jelinek <jakub@redhat.com>
467
468 PR c/69796
469 PR c/69974
470 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
471 of incomplete decls to error_mark_node.
472
0b05329b
MP
4732016-02-24 Marek Polacek <polacek@redhat.com>
474
475 PR c/69819
476 * c-decl.c (finish_decl): Don't update the copy of the type of a
477 different decl type.
478
067fbd8b
JJ
4792016-02-23 Jakub Jelinek <jakub@redhat.com>
480
481 PR objc/69844
482 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
483 in id_kind reclassification.
484
bf14eba2
JJ
4852016-02-16 Jakub Jelinek <jakub@redhat.com>
486
487 PR c/69835
488 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
489
ba539195
JN
4902016-02-16 James Norris <jnorris@codesourcery.com>
491
492 PR c/64748
493 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
494
16595a1f
BS
4952016-02-12 Bernd Schmidt <bschmidt@redhat.com>
496
f48dfe98
BS
497 * c-decl.c (build_null_declspecs): Zero the entire struct.
498
16595a1f
BS
499 PR c/69522
500 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
501 callers changed. If nested_p is true, use it to call
502 finish_implicit_inits.
503 * c-tree.h (finish_implicit_inits): Declare.
504 * c-typeck.c (finish_implicit_inits): New function. Move code
505 from ...
506 (push_init_level): ... here.
507 (set_designator, process_init_element): Call finish_implicit_inits.
508
66756373
JJ
5092016-02-11 Jakub Jelinek <jakub@redhat.com>
510
511 PR c/69768
512 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
513 arguments for -Waddress warning.
514
1066e9b5
JJ
5152016-02-04 Jakub Jelinek <jakub@redhat.com>
516
517 PR c/69669
518 * c-decl.c (finish_enum): When honoring mode attribute,
519 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
520
3a5d2ba4
JJ
5212016-01-29 Jakub Jelinek <jakub@redhat.com>
522
523 PR debug/69518
524 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
525 all type variants, not just TYPE_MAIN_VARIANT.
526
cbdd8ae0
JJ
5272016-01-27 Jakub Jelinek <jakub@redhat.com>
528
529 PR debug/66869
530 * c-decl.c (c_write_global_declarations_1): Warn with
531 warn_unused_function if static prototype without definition
532 is not C_DECL_USED.
533
fa74a4bc
MP
5342016-01-27 Marek Polacek <polacek@redhat.com>
535
536 PR c/68062
537 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
538 to unsigned, if needed. Add -Wsign-compare warning.
539
13f92e8d
JJ
5402016-01-26 Jakub Jelinek <jakub@redhat.com>
541
542 PR tree-optimization/69483
543 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
544
cd8e73dc 5452016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
546
547 PR c/24293
548 * c-tree.h (incomplete_record_decls): Declare.
549 * c-parser.c (incomplete_record_decls): Define.
550 (c_parser_translation_unit): Iterate through incomplete_record_decls and
551 report error if any decl has zero size.
552 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
553 or enum type to incomplete_record_decls.
554
e6d6ec9e
TV
5552016-01-14 Tom de Vries <tom@codesourcery.com>
556
557 PR tree-optimization/68773
558 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
559 set force_output.
560
00083992
MP
5612016-01-14 Marek Polacek <polacek@redhat.com>
562
563 PR c/69262
564 * c-decl.c (grokdeclarator): Provide more information for invalid
565 array declarations.
566
7443cf13
DM
5672016-01-06 David Malcolm <dmalcolm@redhat.com>
568
569 * c-parser.c (c_parser_unary_expression): For dereferences, build
570 a combined location before calling build_indirect_ref, so that
571 error reports cover the full range, manually updating the c_expr
572 src_range.
573
6b131d5b
MP
5742016-01-06 Marek Polacek <polacek@redhat.com>
575
576 PR sanitizer/69099
577 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
578 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
579 NULL.
580
818ab71a
JJ
5812016-01-04 Jakub Jelinek <jakub@redhat.com>
582
583 Update copyright years.
584
2fe0a208
MP
5852016-01-04 Marek Polacek <polacek@redhat.com>
586
587 PR c/68908
588 * c-typeck.c (build_atomic_assign): Improve commentary. Add
589 optimization to use __atomic_fetch_* built-in if possible.
590
c7b48c8a
TS
5912015-12-23 Thomas Schwinge <thomas@codesourcery.com>
592
593 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
594 into...
595 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
596 all users.
597
fda5652f
MP
5982015-12-22 Marek Polacek <polacek@redhat.com>
599
600 PR c/69002
601 * c-typeck.c (build_component_ref): Warn when acessing elements of
602 atomic structures or unions.
603
745e411d
DM
6042015-12-21 David Malcolm <dmalcolm@redhat.com>
605
606 * c-typeck.c: Include "gcc-rich-location.h".
607 (build_binary_op): In the two places that call binary_op_error,
608 create a gcc_rich_location and populate it with the location of
609 the binary op and its two operands.
610
94c40e19
DM
6112015-12-16 David Malcolm <dmalcolm@redhat.com>
612
613 * c-parser.c (c_parser_statement_after_labels): When calling
614 c_finish_return, Use the return expression's location if it has
615 one, falling back to the location of the first token within it.
616 * c-typeck.c (c_finish_return): When issuing warnings about
617 the incorrect presence/absence of a return value, issue a note
618 showing the declaration of the function.
619
de67c4c3
DM
6202015-12-16 David Malcolm <dmalcolm@redhat.com>
621
622 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
623 to 4.
624 (c_parser_peek_nth_token): New function.
625 (c_parser_peek_conflict_marker): New function.
626 (c_parser_error): Detect conflict markers and report them as such.
627
a10704e1
DM
6282015-12-16 David Malcolm <dmalcolm@redhat.com>
629
630 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
631 to preserve range information for the primary expression
632 in the call to c_parser_postfix_expression_after_primary.
633
8062bca6
DM
6342015-12-16 David Malcolm <dmalcolm@redhat.com>
635
636 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
637 expression location, falling back on the first token location,
638 rather than always using the latter.
639
d06f8b75
MP
6402015-12-16 Marek Polacek <polacek@redhat.com>
641
642 PR c/64637
643 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
644 available.
645
2994fb91
MP
6462015-12-15 Marek Polacek <polacek@redhat.com>
647
648 PR c/68907
649 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
650 artificial decl.
651
a1b93f8d
DM
6522015-12-08 David Malcolm <dmalcolm@redhat.com>
653
654 * c-parser.c (c_parser_alignof_expression): Capture location of
655 closing parenthesis (if any), or of end of unary expression, and
656 use it to build a src_range for the expression.
657
46c6e1e2
DM
6582015-12-08 David Malcolm <dmalcolm@redhat.com>
659
660 PR c/68757
661 * c-parser.c (c_parser_get_builtin_args): Add
662 "out_close_paren_loc" param, and write back to it.
663 (c_parser_postfix_expression): Capture the closing
664 parenthesis location for RID_CHOOSE_EXPR,
665 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
666 RID_BUILTIN_SHUFFLE and use it to set the source range
667 for such expressions; within RID_BUILTIN_COMPLEX set
668 the underlying location.
669
66189108
MP
6702015-12-07 Marek Polacek <polacek@redhat.com>
671
672 PR c/68668
673 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
674 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
675
f187980b
EB
6762015-12-04 Eric Botcazou <ebotcazou@adacore.com>
677
678 * c-tree.h (c_build_va_arg): Adjust prototype.
679 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
680 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
681 parameter, adjust throughout and issue an error if EXPR is a component
682 with reverse storage order.
683
4250754e
JM
6842015-12-02 Jason Merrill <jason@redhat.com>
685
686 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
687 (c_fully_fold_internal, decl_constant_value_for_optimization):
688 Move from c-common.c.
689 * c-tree.h: Declare decl_constant_value_for_optimization.
690 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
691
e9e32ee6
JM
6922015-12-02 Joseph Myers <joseph@codesourcery.com>
693
694 PR c/68162
695 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
696 following link from declarator to next declarator. Track original
697 qualified type and pass it to c_build_qualified_type.
698 * c-typeck.c (c_build_qualified_type): Add arguments
699 orig_qual_type and orig_qual_indirect.
700
ff7a55bf
TS
7012015-12-02 Thomas Schwinge <thomas@codesourcery.com>
702
703 * c-parser.c (c_parser_omp_clause_name)
704 (c_parser_oacc_all_clauses): Alphabetical sorting.
705
657e4e47
JJ
7062015-12-02 Jakub Jelinek <jakub@redhat.com>
707
708 PR c/68533
709 * c-decl.c (get_parm_info): Use b->locus instead of input_location
710 for diagnostics.
711
37d5ad46
JB
7122015-12-01 Julian Brown <julian@codesourcery.com>
713 Cesar Philippidis <cesar@codesourcery.com>
714 James Norris <James_Norris@mentor.com>
715
716 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
717 (c_parser_oacc_clause_use_device): New function.
718 (c_parser_oacc_all_clauses): Add use_device support.
719 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
720 (c_parser_oacc_host_data): New function.
721 (c_parser_omp_construct): Add host_data support.
722 * c-tree.h (c_finish_oacc_host_data): Add prototype.
723 * c-typeck.c (c_finish_oacc_host_data): New function.
724 (c_finish_omp_clauses): Add use_device support.
725
a4850ce9
JH
7262015-11-29 Jan Hubicka <hubicka@ucw.cz>
727
728 PR c/67106
729 * c-decl.c: Set TYPE_PACKED in variants.
730
b58d3df2
ML
7312015-11-27 Martin Liska <mliska@suse.cz>
732
733 PR c++/68312
734 * c-array-notation.c (fix_builtin_array_notation_fn):
735 Use release_vec_vec instead of vec::release.
736 (build_array_notation_expr): Likewise.
737 (fix_conditional_array_notations_1): Likewise.
738 (fix_array_notation_expr): Likewise.
739 (fix_array_notation_call_expr): Likewise.
740
aec17bfe
JJ
7412015-11-27 Jakub Jelinek <jakub@redhat.com>
742
743 PR c/63326
744 * c-parser.c (c_parser_compound_statement_nostart): If
745 last_label is true, use pragma_stmt instead of pragma_compound
746 as second c_parser_pragma argument.
747 (c_parser_omp_ordered, c_parser_omp_target_update,
748 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
749 false as second argument to c_parser_skip_to_pragma_eol after
750 diagnosing standalone directives used in pragma_stmt context.
751
688c4de0
IV
7522015-11-24 Ilya Verbin <ilya.verbin@intel.com>
753
754 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
755 with "if (ENABLE_OFFLOADING)".
756
cbd03aee
DM
7572015-11-23 David Malcolm <dmalcolm@redhat.com>
758
759 PR objc/68438
760 * c-parser.c (c_parser_postfix_expression): Set up source ranges
761 for various Objective-C constructs: Class.name syntax,
762 @selector(), @protocol(), @encode(), and [] message syntax.
763
a87a86e1
DM
7642015-11-20 David Malcolm <dmalcolm@redhat.com>
765
766 PR 62314
767 * c-typeck.c (should_suggest_deref_p): New function.
768 (build_component_ref): Special-case POINTER_TYPE when
769 generating a "not a structure of union" error message, and
770 suggest a "->" rather than a ".", providing a fix-it hint.
771
8ece8dfb
DM
7722015-11-19 David Malcolm <dmalcolm@redhat.com>
773
774 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
775 candidate into a new function, find_closest_identifier.
776
433068cc
MP
7772015-11-19 Marek Polacek <polacek@redhat.com>
778
779 PR c/68412
780 * c-typeck.c (parser_build_binary_op): Properly handle
781 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
782
bef08b71
DM
7832015-11-17 David Malcolm <dmalcolm@redhat.com>
784
785 * c-parser.c (set_c_expr_source_range): Bulletproof both
786 overloaded implementations against NULL expr->value.
787 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
788 values.
789 (c_parser_unary_expression): Likewise when handling addresses of
790 labels.
791 (c_parser_postfix_expression): Likewise for statement expressions,
792 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
793 __builtin_va_arg, and for __builtin_offset_of.
794 (c_parser_postfix_expression_after_paren_type): Initialize expr's
795 src_range using the range of the braced initializer.
796 (c_parser_transaction_expression): Set src_range for "ret" to a
797 sane pair of values.
798
fff77217
KY
7992015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
800
801 * c-parser.c (c_finish_omp_declare_simd): Look for
802 "simd" attribute as well. Update error message.
803
1d899da2
TS
8042015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
805
806 * c-parser.c (c_parser_omp_declare_target): Adjust.
807
e4606348
JJ
8082015-11-14 Jakub Jelinek <jakub@redhat.com>
809
810 * c-typeck.c (c_finish_omp_clauses): Don't mark
811 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
812
3e636daf
MP
8132015-11-14 Marek Polacek <polacek@redhat.com>
814
815 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
816 * c-typeck.c: Likewise.
817
ebedc9a3
DM
8182015-11-13 David Malcolm <dmalcolm@redhat.com>
819
820 * c-decl.c (warn_defaults_to): Pass line_table to
821 rich_location ctor.
822 * c-errors.c (pedwarn_c99): Likewise.
823 (pedwarn_c90): Likewise.
824 * c-parser.c (set_c_expr_source_range): New functions.
825 (c_token::get_range): New method.
826 (c_token::get_finish): New method.
827 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
828 based on the range from the start of the LHS to the end of the
829 RHS.
830 (c_parser_conditional_expression): Likewise, based on the range
831 from the start of the cond.value to the end of exp2.value.
832 (c_parser_binary_expression): Call set_c_expr_source_range on
833 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
834 (c_parser_cast_expression): Call set_c_expr_source_range on ret
835 based on the cast_loc through to the end of the expr.
836 (c_parser_unary_expression): Likewise, based on the
837 op_loc through to the end of op.
838 (c_parser_sizeof_expression) Likewise, based on the start of the
839 sizeof token through to either the closing paren or the end of
840 expr.
841 (c_parser_postfix_expression): Likewise, using the token range,
842 or from the open paren through to the close paren for
843 parenthesized expressions.
844 (c_parser_postfix_expression_after_primary): Likewise, for
845 various kinds of expression.
846 * c-tree.h (struct c_expr): Add field "src_range".
847 (c_expr::get_start): New method.
848 (c_expr::get_finish): New method.
849 (set_c_expr_source_range): New decls.
850 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
851 on ret for prefix unary ops.
852 (parser_build_binary_op): Likewise, running from the start of
853 arg1.value through to the end of arg2.value.
854
ec8b536f
MP
8552015-11-13 Marek Polacek <polacek@redhat.com>
856
857 PR c/68320
858 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
859
277fe616
DM
8602015-11-13 David Malcolm <dmalcolm@redhat.com>
861
862 * c-typeck.c: Include spellcheck.h.
863 (lookup_field_fuzzy_find_candidates): New function.
864 (lookup_field_fuzzy): New function.
865 (build_component_ref): If the field was not found, try using
866 lookup_field_fuzzy and potentially offer a suggestion.
867
6e232ba4
JN
8682015-11-12 James Norris <jnorris@codesourcery.com>
869 Joseph Myers <joseph@codesourcery.com>
870
871 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
872 (c_parser_omp_clause_name): Handle 'device_resident' clause.
873 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
874 and PRAGMA_OMP_CLAUSE_LINK.
875 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
876 and PRAGMA_OACC_CLAUSE_LINK.
877 (OACC_DECLARE_CLAUSE_MASK): New definition.
878 (c_parser_oacc_declare): New function.
879
9be4f715
MP
8802015-11-12 Marek Polacek <polacek@redhat.com>
881
882 PR c/67784
883 * c-parser.c (c_parser_for_statement): Reclassify the token in
884 a correct scope.
885
e78bede6
MP
8862015-11-11 Marek Polacek <polacek@redhat.com>
887
888 PR c/68107
889 PR c++/68266
890 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
891 checking the size of an array.
892
69f293c9
AM
8932015-11-11 Andrew MacLeod <amacleod@redhat.com>
894
895 * c-array-notation.c: Remove unused header files.
896 * c-aux-info.c: Likewise.
897 * c-convert.c: Likewise.
898 * c-decl.c: Likewise.
899 * c-errors.c: Likewise.
900 * c-lang.c: Likewise.
901 * c-objc-common.c: Likewise.
902 * c-parser.c: Likewise.
903 * c-typeck.c: Likewise.
904 * gccspec.c: Likewise.
905
3a40d81d
NS
9062015-11-09 Thomas Schwinge <thomas@codesourcery.com>
907 Cesar Philippidis <cesar@codesourcery.com>
908 James Norris <jnorris@codesourcery.com>
909 Julian Brown <julian@codesourcery.com>
910 Nathan Sidwell <nathan@codesourcery.com>
911
912 c/
913 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
914 routine arg.
915 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
916 (c_parser_pragma): Parse 'acc routine'.
917 (OACC_ROUTINE_CLAUSE_MARK): Define.
918 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
919
fc402eec
AA
9202015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
921
922 PR debug/67192
923 * c-typeck.c (c_finish_loop): For unconditional loops, set the
924 location of the backward-goto to the start of the loop body.
925
f6b0b3db
AA
9262015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
927
928 PR debug/67192
929 * c-parser.c (c_parser_while_statement): Finish the loop before
930 parsing ahead for misleading indentation.
931 (c_parser_for_statement): Likewise.
932
ee45a32d
EB
9332015-11-08 Eric Botcazou <ebotcazou@adacore.com>
934
935 * c-decl.c (finish_struct): If the structure has reverse storage
936 order, rewrite the type of array fields with scalar component. Call
937 maybe_apply_pragma_scalar_storage_order on entry.
938 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
939 errors on bit-fields and reverse SSO here and not...
940 (c_mark_addressable): ...here.
941 (output_init_element): Adjust call to initializer_constant_valid_p.
942 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
943
8a645150
DM
9442015-11-06 David Malcolm <dmalcolm@redhat.com>
945
946 * c-decl.c (warn_defaults_to): Update for change in signature
947 of diagnostic_set_info.
948 * c-errors.c (pedwarn_c99): Likewise.
949 (pedwarn_c90): Likewise.
950 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
951 for textinfo::set_location.
952
7a5e4956
CP
9532015-11-05 Cesar Philippidis <cesar@codesourcery.com>
954 Thomas Schwinge <thomas@codesourcery.com>
955 James Norris <jnorris@codesourcery.com>
956
957 * c-parser.c (c_parser_omp_clause_name): Add support for
958 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
959 (c_parser_omp_clause_default): Add is_oacc argument. Handle
960 default(none) in OpenACC.
961 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
962 arguments.
963 (c_parser_oacc_clause_tile): New function.
964 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
965 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
966 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
967 TILE}.
968 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
969 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
970 FIRSTPRIVATE}.
971 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
972 (c_parser_oacc_update): Update the error message for missing clauses.
973 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
974 and OMP_CLAUSE_INDEPENDENT.
975
bfcfbfa0
MP
9762015-11-05 Marek Polacek <polacek@redhat.com>
977
978 PR c/68090
979 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
980 deal with pre-evaluation on invalid types.
981
e01d41e5
JJ
9822015-11-05 Jakub Jelinek <jakub@redhat.com>
983 Ilya Verbin <ilya.verbin@intel.com>
984
985 * c-parser.c: Include context.h and gimple-expr.h.
986 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
987 monotonic together with nonmonotonic.
988 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
989 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
990 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
991 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
992 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
993 expressions on combined target teams before the target.
994 (c_parser_omp_declare_target): If decl has "omp declare target" or
995 "omp declare target link" attribute, and cgraph or varpool node already
996 exists, then set corresponding flags. Call c_finish_omp_clauses
997 in the parenthesized extended-list syntax case.
998 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
999 declare target.
1000 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
1001 on OMP_CLAUSE_REDUCTION array sections.
1002 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
1003 into the constant offset, or for variable low-bound using
1004 POINTER_PLUS_EXPR. For structure element based array sections use
1005 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
1006 (c_finish_omp_clauses): Drop generic_field_head, structure
1007 elements are now always mapped even as array section bases,
1008 diagnose same var in data sharing and mapping clauses. Diagnose if
1009 linear step on declare simd is neither a constant nor a uniform
1010 parameter. Look through POINTER_PLUS_EXPR for array section
1011 reductions. Diagnose the same var or function appearing multiple
1012 times on the same directive. Fix up wording for the to clause if t
1013 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
1014 modifier on kinds other than dynamic or guided or nonmonotonic
1015 modifier together with ordered clause.
1016
4bf9e5a8
TS
10172015-11-03 Thomas Schwinge <thomas@codesourcery.com>
1018 Chung-Lin Tang <cltang@codesourcery.com>
1019
1020 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
1021
2adfab87
AM
10222015-10-29 Andrew MacLeod <amacleod@redhat.com>
1023
1024 * c-array-notation.c: Reorder #include's and remove duplicates.
1025 * c-aux-info.c: Likewise.
1026 * c-convert.c: Likewise.
1027 * c-decl.c: Likewise.
1028 * c-errors.c: Likewise.
1029 * c-lang.c: Likewise.
1030 * c-objc-common.c: Likewise.
1031 * c-parser.c: Likewise.
1032 * c-typeck.c: Likewise.
1033
e922069e
JW
10342015-10-26 Jim Wilson <jim.wilson@linaro.org>
1035
1036 PR debug/66068
1037 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1038 after calling build_qualified_type.
1039
765dd391
CP
10402015-10-27 Cesar Philippidis <cesar@codesourcery.com>
1041 Thomas Schwinge <thomas@codesourcery.com>
1042 James Norris <jnorris@codesourcery.com>
1043 Joseph Myers <joseph@codesourcery.com>
1044 Julian Brown <julian@codesourcery.com>
1045 Bernd Schmidt <bschmidt@redhat.com>
1046
1047 * c-parser.c (c_parser_oacc_shape_clause): New.
1048 (c_parser_oacc_simple_clause): New.
1049 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
1050 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
1051
88bae6f4
TS
10522015-10-27 Thomas Schwinge <thomas@codesourcery.com>
1053 James Norris <jnorris@codesourcery.com>
1054 Cesar Philippidis <cesar@codesourcery.com>
1055
1056 PR c/64765
1057 PR c/64880
1058 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
1059 parameters, and handle these. Adjust all users.
1060 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
1061 into...
1062 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
1063 all users.
1064 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
1065 declare functions.
1066 (c_finish_omp_construct): Declare function.
1067 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
1068 Merge functions into...
1069 (c_finish_omp_construct): ... this new function.
1070
a8fc2579
RB
10712015-10-22 Richard Biener <rguenther@suse.de>
1072
1073 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
1074 before folding a MINUS_EXPR.
1075
e9122ef6
MP
10762015-10-21 Marek Polacek <polacek@redhat.com>
1077
1078 PR c/68024
1079 * c-decl.c (start_function): Warn about vararg functions without
1080 a prototype.
1081
9f47c7e5
IE
10822015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
1083
1084 * c-typeck.c (build_conditional_expr): Use boolean vector
1085 type for vector comparison.
1086 (build_vec_cmp): New.
1087 (build_binary_op): Use build_vec_cmp for comparison.
1088
fa60eeb9
MP
10892015-10-20 Marek Polacek <polacek@redhat.com>
1090
1091 * c-parser.c (is_cilkplus_vector_p): Don't define here.
1092
2c7020eb
MP
10932015-10-20 Marek Polacek <polacek@redhat.com>
1094
1095 PR c/67964
1096 * c-parser.c (c_parser_attributes): Break out of the loop if the
1097 token after an attribute isn't a comma.
1098
d9a6bd32
JJ
10992015-10-13 Jakub Jelinek <jakub@redhat.com>
1100 Aldy Hernandez <aldyh@redhat.com>
1101
1102 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
1103 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
1104 (c_parser_omp_variable_list): Handle structure elements for
1105 map, to and from clauses. Handle array sections in reduction
1106 clause. Formatting fixes.
1107 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
1108 if clause modifiers.
1109 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1110 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1111 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
1112 c_parser_omp_clause_is_device_ptr): New functions.
1113 (c_parser_omp_clause_ordered): Parse optional parameter.
1114 (c_parser_omp_clause_reduction): Handle array reductions.
1115 (c_parser_omp_clause_schedule): Parse optional simd modifier.
1116 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
1117 functions.
1118 (c_parser_omp_clause_linear): Parse linear clause modifiers.
1119 (c_parser_omp_clause_depend_sink): New function.
1120 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
1121 (c_parser_omp_clause_map): Parse release/delete map kinds and
1122 optional always modifier.
1123 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
1124 and c_finish_omp_clauses callers.
1125 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
1126 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
1127 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
1128 (OMP_CRITICAL_CLAUSE_MASK): Define.
1129 (c_parser_omp_critical): Parse critical clauses.
1130 (c_parser_omp_for_loop): Handle doacross loops, adjust
1131 c_finish_omp_for and c_finish_omp_clauses callers.
1132 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
1133 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
1134 (OMP_FOR_CLAUSE_MASK): Add linear clause.
1135 (c_parser_omp_for): Disallow ordered clause when combined with
1136 distribute. Disallow linear clause when combined with distribute
1137 and not combined with simd.
1138 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
1139 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
1140 parse clauses and if depend clause is found, don't parse a body.
1141 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
1142 Allow target parallel without for after it.
1143 (OMP_TASK_CLAUSE_MASK): Add priority clause.
1144 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
1145 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
1146 invalid kinds.
1147 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
1148 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
1149 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
1150 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
1151 functions.
1152 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
1153 defaultmap and is_device_ptr clauses.
1154 (c_parser_omp_target): Parse target parallel and target simd. Set
1155 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
1156 and target exit data. Diagnose invalid map kinds.
1157 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
1158 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
1159 construct.
1160 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
1161 &omp_priv.
1162 (OMP_TASKLOOP_CLAUSE_MASK): Define.
1163 (c_parser_omp_taskloop): New function.
1164 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
1165 handle PRAGMA_OMP_TASKLOOP.
1166 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
1167 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
1168 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
1169 Add IS_OMP argument, handle structure element bases, diagnose
1170 bitfields, pass IS_OMP recursively, diagnose known zero length
1171 array sections in depend clauses, handle array sections in reduction
1172 clause, diagnose negative length even for pointers.
1173 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
1174 types, pass IS_OMP down to handle_omp_array_sections_1, handle
1175 array sections in reduction clause, set
1176 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
1177 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
1178 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
1179 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
1180
21ba0cea
MP
11812015-10-06 Marek Polacek <polacek@redhat.com>
1182
1183 * c-parser.c (c_parser_statement_after_labels): Use
1184 protected_set_expr_location.
1185 (c_parser_omp_clause_num_gangs): Likewise.
1186 (c_parser_omp_clause_num_threads): Likewise.
1187 (c_parser_omp_clause_num_workers): Likewise.
1188 (c_parser_omp_clause_vector_length): Likewise.
1189 (c_parser_omp_clause_num_teams): Likewise.
1190 (c_parser_omp_clause_thread_limit): Likewise.
1191 * c-typeck.c (build_c_cast): Likewise.
1192 (c_cast_expr): Likewise.
1193
624d31fe
RS
11942015-10-05 Richard Sandiford <richard.sandiford@arm.com>
1195
1196 * c-typeck.c (c_tree_equal): Use real_equal instead of
1197 REAL_VALUES_EQUAL.
1198
b8fd7909
JM
11992015-10-04 Jason Merrill <jason@redhat.com>
1200
1201 * c-parser.c (c_lex_one_token): Handle @synchronized.
1202 * c-decl.c (match_builtin_function_types): A declaration of a built-in
1203 can change whether the function is transaction_safe.
1204
1c7485af
MP
12052015-10-02 Marek Polacek <polacek@redhat.com>
1206
1207 PR c/67730
1208 * c-typeck.c (convert_for_assignment): Use the expansion point
1209 location throughout.
1210
3e3b8d63
MP
12112015-10-02 Marek Polacek <polacek@redhat.com>
1212
1213 PR c/64249
1214 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
1215 and pass it down to c_parser_if_statement.
1216 (c_parser_else_body): Add CHAIN parameter and pass it down to
1217 c_parser_statement_after_labels.
1218 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
1219 duplicated if-else-if conditions.
1220
aabef2de
MP
12212015-10-01 Marek Polacek <polacek@redhat.com>
1222
1223 * c-typeck.c (convert_for_assignment): Improve commentary.
1224
de8ddd5f
MP
12252015-09-30 Marek Polacek <polacek@redhat.com>
1226
1227 PR c/67730
1228 * c-typeck.c (c_finish_return): Use the expansion point location for
1229 certain "return with value" warnings.
1230
c4914de6
MLI
12312015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1232
1233 * c-parser.c (pragma_lex): Add loc argument.
1234
0e36f5c7
MP
12352015-09-15 Marek Polacek <polacek@redhat.com>
1236
1237 PR c/67580
1238 * c-decl.c (tag_exists_p): New function.
1239 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
1240 struct/union/enum keywords are missing.
1241 * c-tree.h (tag_exists_p): Declare.
1242
2f3bb934
MP
12432015-09-15 Marek Polacek <polacek@redhat.com>
1244
1245 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
1246 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
1247 Return NULL_TREE instead of 0.
1248 (lookup_name): Return NULL_TREE instead of 0.
1249 (lookup_name_in_scope): Likewise.
1250 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
1251 (parser_xref_tag): Use false instead of 0.
1252 (start_struct): Use true instead of 1.
1253 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
1254
aa256c4a
MP
12552015-09-14 Marek Polacek <polacek@redhat.com>
1256
1257 * c-typeck.c (set_nonincremental_init_from_string): Use
1258 HOST_WIDE_INT_M1U when shifting a negative value.
1259
dbb68221
MW
12602015-09-09 Mark Wielaard <mjw@redhat.com>
1261
1262 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
1263 parm against NULL.
1264
a8a098ac
JJ
12652015-09-10 Jakub Jelinek <jakub@redhat.com>
1266
1267 PR c/67502
1268 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
1269 into OMP_FOR_PRE_BODY rather than before the loop.
1270
f4b189d5
JJ
12712015-09-09 Jakub Jelinek <jakub@redhat.com>
1272
0bb99c11
JJ
1273 PR c/67501
1274 * c-parser.c (c_parser_oacc_all_clauses,
1275 c_parser_omp_all_clauses): Remove invalid clause from
1276 list of clauses even if parser->error is set.
1277
fce5e5e3
JJ
1278 PR c/67500
1279 * c-parser.c (c_parser_omp_clause_aligned,
1280 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
1281 test for errors.
1282 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
1283 error_mark_node.
1284
f4b189d5
JJ
1285 PR c/67495
1286 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
1287 instead of c_parser_unary_expression. If the result is !lvalue_p,
1288 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
1289
b2aaf235
MP
12902015-09-04 Marek Polacek <polacek@redhat.com>
1291
1292 PR sanitizer/67279
1293 * c-typeck.c (build_binary_op): Don't instrument static initializers.
1294
1807ffc1
MS
12952015-09-03 Martin Sebor <msebor@redhat.com>
1296
1297 PR c/66516
8b652e65
JJ
1298 * c-typeck.c (convert_arguments, parser_build_unary_op,
1299 build_conditional_expr, c_cast_expr, convert_for_assignment,
1300 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
1301 reject_gcc_builtin.
1302 (c_decl_implicit): Define.
1303
d04ff417
MP
13042015-09-02 Marek Polacek <polacek@redhat.com>
1305
1306 PR c/67432
1307 * c-parser.c (c_parser_enum_specifier): Give a better error for
1308 an empty enum.
1309
a79683d5
TS
13102015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
1311
1312 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
1313
191a6b94
MP
13142015-08-12 Marek Polacek <polacek@redhat.com>
1315
1316 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
1317 LOC to it.
1318
420a9d9b
MP
13192015-08-03 Marek Polacek <polacek@redhat.com>
1320
1321 PR c/67088
1322 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
1323 Use it.
1324 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
1325
992118a1
PP
13262015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
1327
1328 * c-parser.c (c_parser_if_body): Take token_indent_info
1329 argument. Call warn_for_misleading_indentation even when the
1330 body is a semicolon. Extract token_indent_infos corresponding
1331 to the guard, body and next tokens. Adjust call to
1332 warn_for_misleading_indentation accordingly.
1333 (c_parser_else_body): Likewise.
1334 (c_parser_if_statement): Likewise.
1335 (c_parser_while_statement): Likewise.
1336 (c_parser_for_statement): Likewise.
1337
46308474
LFSM
13382015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
1339 Manuel López-Ibáñez <manu@gcc.gnu.org>
1340
1341 * c-decl.c (get_parm_info): Remove static var. Update warning
1342 message.
1343
05b28fd6
MP
13442015-07-27 Marek Polacek <polacek@redhat.com>
1345
1346 PR c++/66555
1347 PR c/54979
1348 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
1349
451b5e48
MP
13502015-07-20 Marek Polacek <polacek@redhat.com>
1351
1352 PR c++/55095
1353 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
1354 (build_binary_op): Warn about left shift overflows.
1355
1916bcb5
AM
13562015-07-09 Andrew MacLeod <amacleod@redhat.com>
1357
1358 * c-array-notation.c: Adjust includes for flags.h changes.
1359 * c-objc-common.c: Likewise.
1360
c7131fb2
AM
13612015-07-07 Andrew MacLeod <amacleod@redhat.com>
1362
1363 * c-array-notation.c: Adjust includes.
1364 * c-aux-info.c: Likewise.
1365 * c-convert.c: Likewise.
1366 * c-decl.c: Likewise.
1367 * c-errors.c: Likewise.
1368 * c-lang.c: Likewise.
1369 * c-objc-common.c: Likewise.
1370 * c-parser.c: Likewise.
1371 * c-typeck.c: Likewise.
1372
da2e71c9
MLI
13732015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1374
1375 PR fortran/66605
1376 * c-decl.c (finish_function): Call do_warn_unused_parameter.
1377
b155cfd9
MP
13782015-06-29 Marek Polacek <polacek@redhat.com>
1379
1380 PR c/66322
1381 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
1382 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
1383 about -Wswitch-bool here.
1384 (do_case): Update c_add_case_label call.
1385 (c_finish_case): Update c_do_switch_warnings call.
1386
31521951
MP
13872015-06-27 Marek Polacek <polacek@redhat.com>
1388
1389 * c-typeck.c: Use VECTOR_TYPE_P throughout.
1390
22d03525
MP
13912015-06-26 Marek Polacek <polacek@redhat.com>
1392
1393 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1394 INDIRECT_REF_P.
1395 * c-typeck.c (array_to_pointer_conversion): Likewise.
1396 (build_unary_op): Likewise.
1397 (c_finish_return): Likewise.
1398
f0889939
AM
13992015-06-25 Andrew MacLeod <amacleod@redhat.com>
1400
1401 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
1402 * c-parser.c: Likewise.
1403
8d67ee55
RS
14042015-06-25 Richard Sandiford <richard.sandiford@arm.com>
1405
1406 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
1407 instead of pointer_hash.
1408 (detect_field_duplicates): Likewise.
1409
0ae9bd27
MP
14102015-06-25 Marek Polacek <polacek@redhat.com>
1411
1412 * c-array-notation.c: Use VAR_P throughout.
1413 * c-decl.c: Likewise.
1414 * c-objc-common.c: Likewise.
1415 * c-parser.c: Likewise.
1416 * c-typeck.c: Likewise.
1417
62f9079a
MP
14182015-06-25 Marek Polacek <polacek@redhat.com>
1419
1420 * c-decl.c: Use is_global_var throughout.
1421 * c-parser.c: Likewise.
1422 * c-typeck.c: Likewise.
1423
abb226c9
AM
14242015-06-17 Andrew MacLeod <amacleod@redhat.com>
1425
1426 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
1427 * c-aux-info.c: Likewise.
1428 * c-convert.c: Likewise.
1429 * c-decl.c: Likewise.
1430 * c-errors.c: Likewise.
1431 * c-lang.c: Likewise.
1432 * c-objc-common.c: Likewise.
1433 * c-parser.c: Likewise.
1434 * c-typeck.c: Likewise.
1435
8cbababc
JH
14362015-06-11 Jan Hubicka <hubicka@ucw.cz>
1437
1438 PR middle-end/66325
1439 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
1440 variants.
1441
a0349665
PMR
14422015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
1443
1444 * c-decl.c (pop_scope): Register the main translation unit
1445 through the new debug hook.
1446
13fdf2e2
AM
14472015-06-08 Andrew MacLeod <amacleod@redhat.com>
1448
1449 * c-array-notation.c : Adjust include files.
1450 * c-aux-info.c : Likewise.
1451 * c-convert.c : Likewise.
1452 * c-decl.c : Likewise.
1453 * c-errors.c : Likewise.
1454 * c-lang.c : Likewise.
1455 * c-lang.h : Likewise.
1456 * c-objc-common.c : Likewise.
1457 * c-parser.c : Likewise.
1458 * c-typeck.c : Likewise.
1459
d7438551
AH
14602015-06-05 Aldy Hernandez <aldyh@redhat.com>
1461
1462 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
1463 immediately clobber it.
1464 (c_write_global_declarations_1): Remove call to
1465 check_global_declaration_1.
1466 (c_write_global_declarations_2): Remove.
1467 (c_write_final_cleanups): Rename from c_write_global_declarations.
1468 Remove call to finalize_compilation_unit.
1469 Remove calls to debugging hooks.
1470 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
1471 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
1472 * c-tree.h: Remove c_write_global_declarations.
1473
ecb9f223
AM
14742015-06-04 Andrew MacLeod <amacleod@redhat.com>
1475
1476 * c-array-notation.c: Adjust includes for restructured coretypes.h.
1477 * c-aux-info.c: Likewise.
1478 * c-convert.c: Likewise.
1479 * c-decl.c: Likewise.
1480 * c-errors.c: Likewise.
1481 * c-lang.c: Likewise.
1482 * c-objc-common.c: Likewise.
1483 * c-parser.c: Likewise.
1484 * c-typeck.c: Likewise.
1485
9482b620
MP
14862015-06-04 Marek Polacek <polacek@redhat.com>
1487
1488 PR c/66341
1489 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
1490 it is a lvalue.
1491
bc51ace3
PK
14922015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1493
1494 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
1495 Warn for empty struct.
1496 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
1497
ea5b45b6
AT
14982015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
1499
1500 * c-decl.c (start_function): Call plugin before parsing.
1501 (finish_function): Call plugin after parsing.
1502
c2d47482
PK
15032015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1504
1505 PR c/49551
1506 * c-decl.c (merge_decls): Merge DECL_COMMON.
1507
a95492ab
JW
15082015-05-22 Jim Wilson <jim.wilson@linaro.org>
1509
1510 * Make-lang.in (check_gcc_pallelize): Define.
1511
fd5c817a
MP
15122015-05-22 Marek Polacek <polacek@redhat.com>
1513
1514 PR c/47043
1515 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
1516 attributes.
1517
c7b70a3c
MP
15182015-05-21 Marek Polacek <polacek@redhat.com>
1519
1520 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
1521 DECL_BUILT_IN.
1522
21b634ae
MP
15232015-05-20 Marek Polacek <polacek@redhat.com>
1524
1525 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
1526 * c-typeck.c: Likewise.
1527
296a8c2f
MP
15282015-05-19 Marek Polacek <polacek@redhat.com>
1529
1530 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
1531
41b37d5e
JJ
15322015-05-19 Jakub Jelinek <jakub@redhat.com>
1533
1534 PR middle-end/66199
1535 * c-parser.c (c_parser_omp_for_loop): Don't add
1536 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
1537 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
1538 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
1539 constructs.
1540
fab27f52
MM
15412015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
1542
1543 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 1544 swaps.
fab27f52 1545
40de31cf
MLI
15462015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
1547
1548 PR fortran/44054
1549 * c-objc-common.c (c_tree_printer): Replace locus pointer with
1550 accessor function.
1551
3aa3c9fc
MP
15522015-05-14 Marek Polacek <polacek@redhat.com>
1553
1554 PR c/66066
1555 PR c/66127
1556 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
1557 rather than with 0.
1558
c3388e62
DM
15592015-05-12 David Malcolm <dmalcolm@redhat.com>
1560
1561 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
1562 to add a call to warn_for_misleading_indentation.
1563 (c_parser_else_body): Likewise, adding param "else_loc".
1564 (c_parser_if_statement): Check for misleading indentation.
1565 (c_parser_while_statement): Likewise.
1566 (c_parser_for_statement): Likewise.
1567
755e528f
MP
15682015-05-08 Marek Polacek <polacek@redhat.com>
1569
1570 PR c/64918
1571 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
1572 (output_init_element): Likewise.
1573
0173bd2a
MP
15742015-05-07 Marek Polacek <polacek@redhat.com>
1575
1576 PR c/65179
1577 * c-typeck.c (build_binary_op): Warn when left shifting a negative
1578 value.
1579
9babc352
MP
15802015-04-30 Marek Polacek <polacek@redhat.com>
1581
1582 * c-typeck.c (set_init_label): Call error_at instead of error and
1583 pass LOC to it.
1584
ac9f18db
MP
1585 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
1586 the type of a decl.
1587
ec3fba51
MP
1588 * c-typeck.c (c_build_va_arg): Clarify the error message.
1589
b811915d
TS
15902015-04-29 Thomas Schwinge <thomas@codesourcery.com>
1591
1592 * c-parser.c (c_parser_oacc_enter_exit_data): Use
1593 OMP_STANDALONE_CLAUSES.
1594
f3075008
MP
15952015-04-28 Marek Polacek <polacek@redhat.com>
1596
1597 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
1598
4e81b788
MP
15992015-04-28 Marek Polacek <polacek@redhat.com>
1600
1601 PR c/65901
1602 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
1603
6c1db78e
MP
16042015-04-25 Marek Polacek <polacek@redhat.com>
1605
1606 PR c/52085
1607 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
1608 attribute.
1609
5c4abbb8
MP
16102015-04-23 Marek Polacek <polacek@redhat.com>
1611
1612 PR c/65345
1613 * c-decl.c (set_labels_context_r): New function.
1614 (store_parm_decls): Call it via walk_tree_without_duplicates.
1615 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
1616 instead of create_tmp_var. Build TARGET_EXPR instead of
1617 COMPOUND_EXPR.
1618 (build_atomic_assign): Use create_tmp_var_raw instead of
1619 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
1620
06aca1d5
IV
16212015-04-20 Ilya Verbin <ilya.verbin@intel.com>
1622
1623 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
1624 (c_parser_omp_target_update): Add missed %> to error_at ().
1625
8fba1830
BRF
16262015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1627
1628 PR target/55143
1629 * c-decl.c (c_default_pointer_mode): Remove definition.
1630 * c-tree.h (c_default_pointer_mode): Remove declaration.
1631
62021f64
TB
16322015-03-27 Tobias Burnus <burnus@net-b.de>
1633
1634 PR c/65586
1635 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
1636 error out.
1637 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
1638 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
1639 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
1640
9b65e171
JJ
16412015-03-19 Jakub Jelinek <jakub@redhat.com>
1642
1643 * c-decl.c (c_decl_attributes): Also add "omp declare target"
1644 attribute for DECL_EXTERNAL VAR_DECLs.
1645
17958621
JJ
16462015-03-11 Jakub Jelinek <jakub@redhat.com>
1647
1648 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
1649 argument.
1650
7ccb1a11
JJ
16512015-03-10 Jakub Jelinek <jakub@redhat.com>
1652
1653 PR c/65120
1654 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
1655 before preparing arguments to warn_logical_not_parentheses.
1656
01177669
JJ
16572015-03-09 Jakub Jelinek <jakub@redhat.com>
1658
1659 PR c/65120
1660 * c-typeck.c (parser_build_binary_op): Don't warn for
1661 !!x == y or !b == y where b is _Bool.
1662
802ac282
MP
16632015-03-09 Marek Polacek <polacek@redhat.com>
1664
1665 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
1666 * c-decl.c (grokdeclarator): Likewise.
1667 * c-typeck.c (build_binary_op): Likewise.
1668
e5165b60
MP
16692015-02-27 Marek Polacek <polacek@redhat.com>
1670
1671 PR c/65228
1672 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
1673
065d214c
MP
16742015-02-14 Marek Polacek <polacek@redhat.com>
1675
1676 PR c/64768
1677 * c-decl.c (grokdeclarator): Set the range of a flexible array member
1678 declared through a typedef name.
1679
e5d9235b
MP
16802015-02-13 Marek Polacek <polacek@redhat.com>
1681
1682 PR c/65050
1683 * c-decl.c (grokdeclarator): Print also the type when giving
1684 the error message about array's incomplete element type.
1685
fa01ffcc
JJ
16862015-02-11 Jakub Jelinek <jakub@redhat.com>
1687
1688 PR c/64824
1689 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
1690 check in the POP macro.
1691
c3e38a03
MP
16922015-02-09 Marek Polacek <polacek@redhat.com>
1693
1694 PR c/64856
1695 * c-typeck.c (process_init_element): Don't always wrap
1696 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
1697 initializing a range of elements.
1698
4886ec8e
JJ
16992015-02-04 Jakub Jelinek <jakub@redhat.com>
1700
1701 PR c/64824
1702 PR c/64868
1703 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
1704
c3e38a03 17052015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
1706
1707 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
1708 processing enum declaration.
1709
7b33f0c8
MP
17102015-01-29 Marek Polacek <polacek@redhat.com>
1711
1712 PR c/64709
1713 * c-typeck.c (pop_init_level): If constructor_elements has
1714 exactly one element with integer_zerop value, set constructor_zeroinit
1715 to 1. Remove braces around warning_init call.
1716
dea63e49
JJ
17172015-01-27 Jakub Jelinek <jakub@redhat.com>
1718
1719 PR c/64766
1720 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
1721 of FUNCTION_DECLs with error_mark_node.
1722
d38f7dce
JJ
17232015-01-26 Jakub Jelinek <jakub@redhat.com>
1724
1725 PR c/64778
1726 * c-typeck.c (convert_arguments): Return -1 if there are
1727 error_args, even if we've diagnosed too many arguments.
1728
cbf5d0e7
RB
17292015-01-21 Richard Biener <rguenther@suse.de>
1730
1731 PR middle-end/64313
1732 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
1733 for builtins the user declared correctly.
1734
41dbbb37
TS
17352015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1736 Bernd Schmidt <bernds@codesourcery.com>
1737 Cesar Philippidis <cesar@codesourcery.com>
1738 James Norris <jnorris@codesourcery.com>
1739 Jakub Jelinek <jakub@redhat.com>
1740 Ilmir Usmanov <i.usmanov@samsung.com>
1741
1742 * c-parser.c: Include "gomp-constants.h".
1743 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
1744 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1745 Use OMP_CLAUSE_SET_MAP_KIND.
1746 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
1747 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
1748 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
1749 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
1750 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
1751 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
1752 "copyout", "create", "delete", "deviceptr", "gang", "host",
1753 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
1754 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
1755 "present_or_create", "pcreate", "seq", "self", "vector",
1756 "vector_length", "wait", "worker".
1757 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1758 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
1759 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
1760 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
1761 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
1762 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
1763 (c_parser_oacc_data_clause_deviceptr)
1764 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
1765 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
1766 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
1767 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
1768 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
1769 (c_parser_oacc_parallel, c_parser_oacc_update)
1770 (c_parser_oacc_wait): New functions.
1771 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
1772 (c_finish_oacc_data): New prototypes.
1773 * c-typeck.c: Include "gomp-constants.h".
1774 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
1775 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
1776 OMP_CLAUSE_SET_MAP_KIND.
1777 (c_finish_oacc_parallel, c_finish_oacc_kernels)
1778 (c_finish_oacc_data): New functions.
1779 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
1780 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
1781 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
1782 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
1783 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
1784 GOMP_MAP_FORCE_DEVICEPTR.
1785
adfac8df
JJ
17862015-01-09 Michael Collison <michael.collison@linaro.org>
1787
1788 * c-array-notation.c: Include hash-set.h, machmode.h,
1789 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1790 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
1791 * c-aux-info.c: Ditto.
1792 * c-convert.c: Ditto.
1793 * c-decl.c: Ditto.
1794 * c-errors.c: Ditto.
1795 * c-lang.c: Dittoxs.
1796 * c-objc-common.c: Ditto.
1797 * c-parser.c: Ditto.
1798 * c-typeck.c: Include hash-set.h, machmode.h,
1799 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1800 fold-const.h, wide-int.h, inchash.h, real.h and
1801 fixed-value.h due to flattening of tree.h.
1802
2cc901dc
MP
18032015-01-07 Marek Polacek <polacek@redhat.com>
1804
1805 PR c/64417
1806 * c-typeck.c (process_init_element): Disallow initialization of
1807 a flexible array member with a string constant if the structure
1808 is in an array.
1809
5624e564
JJ
18102015-01-05 Jakub Jelinek <jakub@redhat.com>
1811
e5341100
JJ
1812 PR sanitizer/64344
1813 * c-typeck.c (convert_for_assignment, c_finish_return): For
1814 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
1815 types also set in_late_binary_op around convert call.
1816 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
1817 to integral type casts, if not in_late_binary_op, pass c_fully_fold
1818 result on expr as last argument to ubsan_instrument_float_cast,
1819 if in_late_binary_op, don't use c_save_expr but save_expr.
1820
5624e564
JJ
1821 Update copyright years.
1822
5bd012f8
MP
18232015-01-05 Marek Polacek <polacek@redhat.com>
1824
1825 PR c/64423
1826 * c-typeck.c (build_array_ref): Pass loc down to
1827 warn_array_subscript_with_type_char.
1828
768952be
MU
18292014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
1830
1831 * c-typeck.c: New behavious for pointers to arrays with qualifiers
1832 (common-pointer-type): For pointers to arrays take qualifiers from
1833 element type.
1834 (build_conditional_expr): Add warnings for lost qualifiers.
1835 (comp-target-types): Allow pointers to arrays with different qualifiers.
1836 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
1837 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
1838 to PEDWARN_FOR_QUALIFIERS.
1839
8f94a8c4
JJ
18402014-12-17 Jakub Jelinek <jakub@redhat.com>
1841
1842 PR sanitizer/64289
1843 * c-convert.c: Include ubsan.h.
1844 (convert): For real -> integral casts and
1845 -fsanitize=float-cast-overflow don't call convert_to_integer, but
1846 instead instrument the float cast directly.
1847
b731b390
JJ
18482014-11-29 Jakub Jelinek <jakub@redhat.com>
1849
1850 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
1851 c_finish_stmt_expr): Remove NULL last argument from
1852 create_tmp_var_raw and create_tmp_var calls.
1853 * c-array-notation.c (fix_builtin_array_notation_fn,
1854 build_array_notation_expr, fix_conditional_array_notations_1,
1855 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
1856
541e35a6
MP
18572014-11-28 Marek Polacek <polacek@redhat.com>
1858
1859 PR c/63862
1860 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
1861 convert the right operand to integer type.
1862
b286be94
MP
18632014-11-25 Marek Polacek <polacek@redhat.com>
1864
1865 PR c/63877
1866 * c-decl.c (start_function): Disable -Wmissing-declarations warning
1867 for inline functions.
1868
aa7da51a
JJ
18692014-11-21 Jakub Jelinek <jakub@redhat.com>
1870
1871 PR target/63764
1872 * c-typeck.c (build_array_ref): Adjust
1873 convert_vector_to_pointer_for_subscript caller. If it returns true,
1874 call non_lvalue_loc on the result.
1875
d876207f
RB
18762014-11-11 Richard Biener <rguenther@suse.de>
1877
1878 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
1879 to true.
1880
e5e44252
AK
18812014-11-10 Andi Kleen <ak@linux.intel.com>
1882
1883 PR c/60804
1884 * c-parser.c (c_parser_statement_after_labels): Call
1885 check_no_cilk.
1886 (c_parser_if_statement): Dito.
1887 (c_parser_switch_statement): Dito.
1888 (c_parser_while_statement): Dito.
1889 (c_parser_do_statement): Dito.
1890 (c_parser_for_statement): Dito.
1891 * c-typeck.c (c_finish_loop): Dito.
1892
13c21655
PC
18932014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
1894
1895 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
1896 OPT_Wshift_count_overflow in the warnings.
1897
2d51fcef
MP
18982014-10-30 Marek Polacek <polacek@redhat.com>
1899
1900 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
1901 print the stripped version as well, if they're not the same.
1902
ef4bddc2
RS
19032014-10-29 Richard Sandiford <richard.sandiford@arm.com>
1904
1905 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
1906 machine_mode.
1907
c582198b
AM
19082014-10-28 Andrew MacLeod <amacleod@redhat.com>
1909
1910 * c-decl.c: Adjust include files.
1911 * c-parser.c: Ditto.
1912
ddc8de03
PM
19132014-10-27 Phil Muldoon <pmuldoon@redhat.com>
1914 Tom Tromey <tromey@redhat.com>
1915
1916 * c-tree.h (enum c_oracle_request): New.
1917 (c_binding_oracle_function): New typedef.
1918 (c_binding_oracle, c_pushtag, c_bind): Declare.
1919 * c-decl.c (c_binding_oracle): New global.
1920 (I_SYMBOL_CHECKED): New macro.
1921 (i_symbol_binding): New function.
1922 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
1923 (I_TAG_CHECKED): New macro.
1924 (i_tag_binding): New function.
1925 (I_TAG_BINDING, I_TAG_DECL): Redefine.
1926 (I_LABEL_CHECKED): New macro.
1927 (i_label_binding): New function.
1928 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
1929 (c_print_identifier): Save and restore c_binding_oracle.
1930 (c_pushtag, c_bind): New functions.
1931
60393bbc
AM
19322014-10-27 Andrew MacLeod <amacleod@redhat.com>
1933
1934 * c-typeck.c: Adjust include files.
1935
d723bb7c
MLI
19362014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
1937
1938 PR c++/53061
1939 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
1940 initialization here...
1941 (c_initialize_diagnostics): ... but here. Set defaults after
1942 building pretty-printer.
1943
1bc5a451
MP
19442014-10-23 Marek Polacek <polacek@redhat.com>
1945
1946 PR c/63626
1947 * c-decl.c (pop_scope): Don't print warning in external_scope.
1948
4435bb92
MP
19492014-10-19 Marek Polacek <polacek@redhat.com>
1950
1951 PR c/63567
1952 * c-typeck.c (output_init_element): Allow initializing objects with
1953 static storage duration with compound literals even in C99 and add
1954 pedwarn for it.
1955
7278465e
MP
19562014-10-17 Marek Polacek <polacek@redhat.com>
1957
1958 PR c/63567
1959 * c-typeck.c (digest_init): Allow initializing objects with static
1960 storage duration with compound literals even in C99 and add pedwarn
1961 for it.
1962
d9b7be2e
MP
19632014-10-17 Marek Polacek <polacek@redhat.com>
1964
1965 PR c/63543
1966 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
1967 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
1968 error multiple times. Print the type.
1969
f406ae1f
MP
19702014-10-17 Marek Polacek <polacek@redhat.com>
1971
1972 PR c/63549
1973 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
1974 type.
1975
92574c7c
MP
19762014-10-17 Marek Polacek <polacek@redhat.com>
1977
1978 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
1979 (start_function): Use OPT_Wimplicit_int instead of 0.
1980 (store_parm_decls_oldstyle): Likewise.
1981
1bc4a978
MT
19822014-10-17 Alan Modra <amodra@gmail.com>
1983
1984 PR middle-end/61848
1985 * c-decl.c (merge_decls): Don't merge section name or tls model
1986 to newdecl symtab node, instead merge to olddecl. Override
1987 existing olddecl section name. Set tls_model for all thread-local
1988 vars, not just OMP thread-private ones. Remove incorrect comment.
1989
83685514
AM
19902014-10-16 Andrew MacLeod <amacleod@redhat.com>
1991
1992 * c-decl.c: Adjust include files.
1993
78a7c317
DD
19942014-10-14 DJ Delorie <dj@redhat.com>
1995
1996 * c-parser.c (c_parse_init): Add RID entries for each __intN.
1997 (c_token_starts_typename): Check all __intN, not just __int128.
1998 (c_token_starts_declspecs): Likewise.
1999 (c_parser_declspecs): Likewise.
2000 (c_parser_attribute_any_word): Likewise.
2001 (c_parser_objc_selector): Likewise.
2002 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
2003 (struct c_declspecs): Add int_n_idx field to record *which* __intN
2004 is specified.
2005 * c-decl.c (declspecs_add_type): Check for all __intN, not just
2006 __int128.
2007 (finish_declspecs): Likewise.
2008
74d98c1e
AB
20092014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
2010
2011 * c-parser.c (c_parser_all_labels): New function to replace
2012 the duplicate code.
2013 (c_parser_statement): Call the new function.
2014
84937de2
MP
20152014-10-09 Marek Polacek <polacek@redhat.com>
2016
2017 PR c/63480
2018 * c-typeck.c (pop_init_level): Don't warn about initializing
2019 with { }.
2020
0382aaa0
MP
20212014-10-07 Marek Polacek <polacek@redhat.com>
2022
2023 PR c/59717
2024 * c-decl.c (header_for_builtin_fn): New function.
2025 (implicitly_declare): Suggest which header to include.
2026
7a0ca710
MP
20272014-10-07 Marek Polacek <polacek@redhat.com>
2028
2029 * c-convert.c (convert): Use error_operand_p.
2030 * c-typeck.c (require_complete_type): Likewise.
2031 (really_atomic_lvalue): Likewise.
2032 (digest_init): Likewise.
2033 (handle_omp_array_sections_1): Likewise.
2034
6bc8a126
MP
20352014-10-03 Marek Polacek <polacek@redhat.com>
2036
2037 PR c/63453
2038 * c-decl.c (pop_scope): Don't warn about "inline function declared
2039 but never defined" for functions marked with gnu_inline attribute.
2040
d90c0a59
JJ
20412014-09-25 Jakub Jelinek <jakub@redhat.com>
2042
2043 PR c++/63249
2044 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
2045 on low_bound and length.
2046
083e891e
MP
20472014-09-24 Marek Polacek <polacek@redhat.com>
2048
2049 PR c/61405
2050 PR c/53874
2051 * c-parser.c: Don't define CPP_KEYWORD.
2052 (c_parser_switch_statement): Pass original type to c_finish_case.
2053 * c-tree.h (c_finish_case): Update declaration.
2054 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
2055 conditionally to c_do_switch_warnings.
2056
8d95fe25
MP
20572014-09-03 Marek Polacek <polacek@redhat.com>
2058
2059 PR c/62024
2060 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
2061 conversions.
2062
9a771876
JJ
20632014-09-02 Jakub Jelinek <jakub@redhat.com>
2064 Balaji V. Iyer <balaji.v.iyer@intel.com>
2065 Igor Zamyatin <igor.zamyatin@intel.com>
2066
2067 * c-parser.c (c_parser_cilk_for): New function.
2068 (c_parser_cilk_grainsize): Likewise.
2069 (c_get_temp_regvar): Likewise.
2070 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
2071 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
2072 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
2073 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
2074 case.
2075
b7679d96
CG
20762014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
2077
2078 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
2079 with using HOST_WIDE_INT without truncation to 'int'
2080
59ea0364
MP
20812014-08-22 Marek Polacek <polacek@redhat.com>
2082
2083 PR c++/62199
2084 * c-typeck.c (parser_build_binary_op): Adjust call to
2085 warn_logical_not_parentheses.
2086
671a475e
IZ
20872014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
2088
2089 PR other/62008
2090 * c-parser.c (c_parser_array_notation): Check for correct
2091 type of an array added.
2092
04159acf
MP
20932014-08-19 Marek Polacek <polacek@redhat.com>
2094
2095 PR c++/62153
2096 * c-typeck.c (build_binary_op): If either operand of a comparison
2097 is a boolean expression, call maybe_warn_bool_compare.
2098
c77935ee
PP
20992014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
2100
2101 PR c/45584
2102 * c-typeck.c (build_c_cast): Do a conversion even when the
2103 TYPE_MAIN_VARIANTs are the same.
2104
35aff4fb
MP
21052014-08-19 Marek Polacek <polacek@redhat.com>
2106
2107 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
2108 pedwarn_c99 instead of pedwarn.
2109 (grokfield): Likewise.
2110 (warn_defaults_to): New function.
2111 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
2112 Unconditionally call pedwarn_c99 instead of pedwarn.
2113 (start_function): Call warn_defaults_to instead of pedwarn_c99.
2114 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
2115 check flag_isoc11 before.
2116 * c-errors.c (pedwarn_c99): Change the return type to bool.
2117 Handle -Wc99-c11-compat.
2118 * c-parser.c (disable_extension_diagnostics): Handle
2119 warn_c99_c11_compat.
2120 (restore_extension_diagnostics): Likewise.
2121 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
2122 instead of pedwarn, don't check flag_isoc11 before.
2123 (c_parser_declspecs): Likewise.
2124 (c_parser_alignas_specifier): Likewise.
2125 (c_parser_alignof_expression): Likewise.
2126 (c_parser_generic_selection): Likewise.
2127 * c-tree.h (pedwarn_c99): Update declaration.
2128 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
2129 of pedwarn_c99.
2130
177cce46
MP
21312014-08-19 Marek Polacek <polacek@redhat.com>
2132
2133 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
2134 to pedwarn_c90.
2135 * c-errors.c: Include "opts.h".
2136 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
2137 * c-parser.c (disable_extension_diagnostics): Handle negative value
2138 of warn_c90_c99_compat, too.
2139 (restore_extension_diagnostics): Likewise.
2140 (c_parser_compound_statement_nostart): Pass
2141 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
2142
6dc99c33
MP
21432014-08-12 Marek Polacek <polacek@redhat.com>
2144
2145 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
2146 Add pedwarn.
2147 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
2148 Likewise.
2149 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
2150
f3bede71
MP
21512014-08-10 Marek Polacek <polacek@redhat.com>
2152
2153 PR c/51849
2154 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
2155 Call pedwarn_c90 instead of pedwarn.
2156 (check_bitfield_type_and_width): Likewise.
2157 (declspecs_add_qual): Likewise.
2158 (declspecs_add_type): Likewise.
2159 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
2160 Adjust to only call pedwarn_c90.
2161 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
2162 pedwarn_c90 instead of pedwarn.
2163 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
2164 * c-parser.c (disable_extension_diagnostics): Handle
2165 warn_c90_c99_compat.
2166 (restore_extension_diagnostics): Likewise.
2167 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
2168 pedwarn_c90 instead of pedwarn.
2169 (c_parser_initelt): Likewise.
2170 (c_parser_postfix_expression): Likewise.
2171 (c_parser_postfix_expression_after_paren_type): Likewise.
2172 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
2173 * c-tree.h: Fix formatting.
2174 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
2175 pedwarn_c90 instead of pedwarn.
2176
9f25a338
TS
21772014-08-07 Trevor Saunders <tsaunders@mozilla.com>
2178
2179 * c-typeck.c: Remove include of pointer-set.h.
2180
044331a8
MP
21812014-08-07 Marek Polacek <polacek@redhat.com>
2182
2183 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
2184
b787e7a2
TS
21852014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2186
2187 * c-typeck.c: Use hash_map instead of pointer_map.
2188
6e2830c3
TS
21892014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2190
2191 * c-decl.c: Use hash_set instead of pointer_set.
2192
a7ee52fb
IZ
21932014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
2194
2195 PR middle-end/61455
2196 * c-array-notation.c (expand_array_notations): Handling
2197 of DECL_EXPR added.
2198
b4dfdc11
MG
21992014-07-31 Marc Glisse <marc.glisse@inria.fr>
2200
2201 PR c++/60517
2202 * c-typeck.c (c_finish_return): Return 0 instead of the address of
2203 a local variable.
2204
976d5a22
TT
22052014-07-30 Tom Tromey <tromey@redhat.com>
2206
2207 * c-typeck.c (struct constructor_stack) <designator_depth>: New
2208 field.
2209 (really_start_incremental_init, push_init_level): Initialize
2210 designator_depth.
2211 (pop_init_level): Set global designator_depth.
2212 (process_init_element): Check for designated_init attribute.
2213
30281de2
MP
22142014-07-20 Marek Polacek <polacek@redhat.com>
2215
2216 PR c/61852
2217 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
2218 (implicitly_declare): Pass location to implicit_decl_warning.
2219
b108f48f
JJ
22202014-07-14 Jakub Jelinek <jakub@redhat.com>
2221
2222 PR middle-end/61294
2223 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
2224 If non-NULL, call c_parser_check_literal_zero.
2225 (c_parser_check_literal_zero): New function.
2226 (c_parser_postfix_expression_after_primary): Adjust
2227 c_parser_expr_list caller, handle -Wmemset-transposed-args.
2228
773ec47f
MP
22292014-07-06 Marek Polacek <polacek@redhat.com>
2230
2231 PR c/6940
2232 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
2233 * c-tree.h (C_ARRAY_PARAMETER): Define.
2234 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
2235 function parameter.
2236
22e1cf1c
JH
22372014-07-02 Jan Hubicka <hubicka@ucw.cz>
2238 Chen Gang <gang.chen.5i5j@gmail.com>
2239
2240 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
2241 releasing symbol.
2242
52ec0ea3
MP
22432014-07-01 Marek Polacek <polacek@redhat.com>
2244
2245 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
2246 instead of 0 to WARN_FOR_ASSIGNMENT.
2247
d5c3d343
MP
22482014-07-01 Marek Polacek <polacek@redhat.com>
2249
2250 PR c/58286
2251 * c-typeck.c (convert_for_assignment): Pass
2252 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
2253
6a7253a4
MP
22542014-06-30 Marek Polacek <polacek@redhat.com>
2255
2256 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
2257 has no_sanitize_undefined attribute.
2258
5e88a8f4
IZ
22592014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
2260
2261 PR middle-end/57541
2262 * c-array-notation.c (fix_builtin_array_notation_fn):
2263 Check for 0 arguments in builtin call. Check that bultin argument is
2264 correct.
2265 * c-parser.c (c_parser_array_notation): Check for incorrect initial
2266 index.
2267
9698b078
SH
22682014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
2269
2270 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
2271 qualifiers in __auto_type for atomic types.
2272 (c_parser_typeof_specifier): Discard all type qualifiers in
2273 __typeof__ for atomic types.
2274
6e07c515
MP
22752014-06-25 Marek Polacek <polacek@redhat.com>
2276
2277 PR c/61162
2278 * c-parser.c (c_parser_statement_after_labels): Pass the location of
2279 the return expression to c_finish_return.
2280
da6f124d
JJ
22812014-06-25 Jakub Jelinek <jakub@redhat.com>
2282
2283 * c-typeck.c (c_finish_omp_clauses): Make sure
2284 OMP_CLAUSE_LINEAR_STEP has correct type.
2285
c203e8a7
TS
22862014-06-24 Trevor Saunders <tsaunders@mozilla.com>
2287
2288 * c-decl.c: Adjust.
2289
56ad0e38
JJ
22902014-06-24 Jakub Jelinek <jakub@redhat.com>
2291
2292 * c-parser.c (c_parser_omp_for_loop): For
2293 #pragma omp parallel for simd move lastprivate clause from parallel
2294 to for rather than simd.
2295
47c2554f
MP
22962014-06-23 Marek Polacek <polacek@redhat.com>
2297
2298 * c-typeck.c (parser_build_binary_op): Don't call
2299 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
2300
56363ffd
JH
23012014-06-15 Jan Hubicka <hubicka@ucw.cz>
2302
2303 * c-parser.c (c_parser_omp_threadprivate): Likewise.
2304 * c-decl.c (merge_decls): Likewise.
2305
d7ff7ae5
MP
23062014-06-09 Marek Polacek <polacek@redhat.com>
2307
2308 PR c/36446
2309 * c-typeck.c (error_init): Call inform instead of error_at.
2310 (pedwarn_init): Call inform instead of pedwarn.
2311 (warning_init): Call inform instead of warning_at.
2312
24d047a3
JH
23132014-06-07 Jan Hubicka <hubicka@ucw.cz>
2314
2315 * c-decl.c (merge_decls): Use set_decl_section_name.
2316 (duplicate_decls): Remove node if it exists.
2317
9bac5cbb
G
23182014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
2319
2320 PR c/53119
2321 * c-typeck.c (push_init_level, process_init_element,
2322 pop_init_level): Correct check for zero initialization, move
2323 missing brace warning to respect zero initialization.
2324
8ffcdea8
MP
23252014-06-05 Marek Polacek <polacek@redhat.com>
2326
2327 PR c/56724
2328 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
2329
742938c9
MP
23302014-06-05 Marek Polacek <polacek@redhat.com>
2331
2332 PR c/49706
2333 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
2334 on the left hand side operand of a comparison.
2335
6447c55d
MP
23362014-06-05 Marek Polacek <polacek@redhat.com>
2337
2338 PR c/48062
2339 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
2340 Print note only if the warning was printed.
2341
9dc7743c
IZ
23422014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
2343
2344 PR c/58942
2345 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
2346 with a pointer.
2347
fedfecef
MP
23482014-06-03 Marek Polacek <polacek@redhat.com>
2349
2350 PR c/60439
2351 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
2352 c_start_case.
2353 * c-tree.h (c_start_case): Update.
2354 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
2355 switch condition has boolean value.
2356
9b2b7279
AM
23572014-06-02 Andrew MacLeod <amacleod@redhat.com>
2358
2359 * c-decl.c: Include builtins.h.
2360 * c-parser.c: Likewise.
2361
5c1bc275
MP
23622014-05-27 Marek Polacek <polacek@redhat.com>
2363
2364 PR c/56724
2365 * c-typeck.c (convert_arguments): Get location of a parameter. Change
2366 error and warning calls to error_at and warning_at. Pass location of
2367 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
2368 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
2369 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
2370
97563bc8
IZ
23712014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
2372
2373 PR c/61191
2374 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
2375 function parameters.
2376
aede2c10
JH
23772014-05-23 Jan Hubicka <hubicka@ucw.cz>
2378
2379 * c-decl.c (merge_decls): Preserve symtab node pointers.
2380 (duplicate_decls): Free new decl.
2381
edbba2ce
TS
23822014-05-23 Thomas Schwinge <thomas@codesourcery.com>
2383
f3316c6d
TS
2384 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
2385 initialization.
2386
edbba2ce
TS
2387 * c-parser.c (c_parser_omp_target): Return bool values.
2388
68c81f24
TS
23892014-05-22 Thomas Schwinge <thomas@codesourcery.com>
2390
2391 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
2392 num_teams_loc variable to num_thread_limit_loc.
2393
632f2871
RS
23942014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
2395
2396 * c-array-notation.c (expand_array_notations): Use void_node
2397 instead of void_zero_node.
2398
766090c2
TS
23992014-05-17 Trevor Saunders <tsaunders@mozilla.com>
2400
2401 * c-decl.c (finish_struct): Adjust.
2402 (finish_enum): Likewise.
2403 (bind): Adjust.
2404 (record_inline_static): Likewise.
2405 (push_scope): Likewise.
2406 (make_label): Likewise.
2407 (lookup_label_for_goto): Likewise.
2408 (finish_struct): Likewise.
2409 (finish_enum): Likewise.
2410 (store_parm_decls): Likewise.
2411 (c_push_function_context): Likewise.
2412 * c-lang.h: Remove usage of variable_size gty attribute.
2413 * c-parser.c (c_parse_init): Adjust.
2414 (c_parse_file): Likewise.
2415
2b107f6b
MP
24162014-05-13 Marek Polacek <polacek@redhat.com>
2417
2418 PR c/61162
2419 * c-typeck.c (convert_for_assignment): Pass location to
2420 WARN_FOR_ASSIGNMENT instead of input_location.
2421
d033409e
MP
24222014-05-10 Marek Polacek <polacek@redhat.com>
2423
2424 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
2425 maybe_warn_string_init.
2426 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
2427 maybe_warn_string_init.
2428 * c-tree.h (maybe_warn_string_init): Update declaration.
2429 * c-typeck.c (maybe_warn_string_init): Add location parameter.
2430 Call pedwarn_init with loc instead of with input_location.
2431 (digest_init): Pass init_loc to maybe_warn_string_init.
2432 (pop_init_level): Call pedwarn_init with loc instead of with
2433 input_location.
2434 (set_init_index): Likewise.
2435 (process_init_element): Likewise.
2436
ea58ef42
MP
24372014-05-09 Marek Polacek <polacek@redhat.com>
2438
2439 PR c/61096
2440 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
2441 (c_parser_initelt): Pass location to set_init_label. Pass array index
2442 location to set_init_index.
2443 * c-tree.h (push_init_level): Update declaration.
2444 (pop_init_level): Likewise.
2445 (set_init_index): Likewise.
2446 (set_init_label): Likewise.
2447 * c-typeck.c (error_init): Add location parameter. Call error_at
2448 instead of error.
2449 (digest_init): Pass init_loc to error_init.
2450 (really_start_incremental_init):
2451 (push_init_level): Add location parameter. Pass loc to pop_init_level
2452 and error_init.
2453 (pop_init_level): Likewise.
2454 (set_designator): Add location parameter. Pass loc to pop_init_level,
2455 push_init_level, and error_init.
2456 (set_init_index): Add location parameter. Pass loc to error_init and
2457 set_designator.
2458 (set_init_label): Likewise.
2459 (output_init_element): Pass loc to error_init.
2460 (process_init_element): Pass loc to error_init, pop_init_level,
2461 pedwarn_init, and push_init_level.
2462
661a0813
MP
24632014-05-09 Marek Polacek <polacek@redhat.com>
2464
2465 PR c/50459
2466 * c-parser.c (c_parser_attributes): Parse the arguments as an
2467 expression-list if the attribute takes identifier.
2468
2793eeab
MP
24692014-05-08 Marek Polacek <polacek@redhat.com>
2470
2471 PR c/61053
2472 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
2473 TYPE_ALIGN_UNIT.
2474
f827930a
MP
24752014-05-08 Marek Polacek <polacek@redhat.com>
2476
2477 PR c/61077
2478 * c-decl.c (start_function): Warn for _Atomic-qualified return type
2479 of main.
2480
1d60af08
KZ
24812014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
2482 Mike Stump <mikestump@comcast.net>
2483 Richard Sandiford <rdsandiford@googlemail.com>
2484
2485 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
2486 (finish_enum): Use wide-int interfaces.
2487 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
2488 * c-typeck.c (build_c_cast): Likewise.
2489 (set_nonincremental_init_from_string): Likewise.
2490 (c_tree_equal): Likewise.
2491
a0e24419
MP
24922014-05-02 Marek Polacek <polacek@redhat.com>
2493
2494 PR c/25801
2495 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
2496 Return size_one_node when the type is not complete.
2497 (pointer_diff): Remove comment.
2498 (build_unary_op): Improve error messages.
2499
19fc9faa
MP
25002014-05-02 Marek Polacek <polacek@redhat.com>
2501
2502 * c-typeck.c (c_finish_return): Separate warning_at calls.
2503
63bc4e87
MP
25042014-05-02 Marek Polacek <polacek@redhat.com>
2505
2506 * c-tree.h (error_init): Remove declaration.
2507 (pedwarn_init): Likewise.
2508 * c-typeck.c (error_init): Make static and move above.
2509 (pedwarn_init): Likewise.
2510 (warning_init): Move above.
2511 (maybe_warn_string_init): Likewise.
2512
4bd2511b
JL
25132014-05-01 Jeff Law <law@redhat.com>
2514
2515 Revert:
2516
2517 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2518 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
2519 avoid goto.
2520
6a358dcb
MP
25212014-05-02 Marek Polacek <polacek@redhat.com>
2522
2523 PR c/60784
2524 * c-typeck.c (push_init_level): Set constructor_designated to
2525 p->designated for structures.
2526
ae5ebda4
MP
25272014-05-01 Marek Polacek <polacek@redhat.com>
2528
2529 PR c/60915
2530 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
2531 function-definition has an attribute after the declarator.
2532
96b40f8d
MP
25332014-05-01 Marek Polacek <polacek@redhat.com>
2534
2535 PR c/60257
2536 * c-typeck.c (warning_init): Add location_t parameter. Call
2537 warning_at instead of warning.
2538 (push_init_level): Pass input_location to warning_init.
2539 (add_pending_init): Add location_t parameter. Pass loc to
2540 warning_init.
2541 (set_nonincremental_init): Pass input_location to add_pending_init.
2542 (set_nonincremental_init_from_string): Likewise.
2543 (output_init_element): Pass loc to warning_init and to
2544 add_pending_init.
2545
32e00768
MP
25462014-05-01 Marek Polacek <polacek@redhat.com>
2547
2548 PR c/43395
2549 * c-typeck.c (c_finish_return): Distinguish between label and variable
2550 when warning about returning local address.
2551
c9379ce2
MP
25522014-05-01 Marek Polacek <polacek@redhat.com>
2553
2554 PR c/29467
2555 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
2556 in C89 mode.
2557
d00887e8
MP
25582014-05-01 Marek Polacek <polacek@redhat.com>
2559
2560 PR c/43245
2561 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
2562 instead of 0 to WARN_FOR_QUALIFIERS.
2563
5436fa2e
MP
25642014-05-01 Marek Polacek <polacek@redhat.com>
2565
2566 PR c/56989
2567 * c-typeck.c (default_conversion): Use better location for
2568 error call.
2569
f8ed5150
MP
25702014-04-30 Marek Polacek <polacek@redhat.com>
2571
2572 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
2573 also when SANITIZE_FLOAT_DIVIDE is on.
2574
8337d1db
MP
25752014-04-30 Marek Polacek <polacek@redhat.com>
2576
2577 PR c/60139
2578 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
2579 and pedwarn_init. Use loc insted of input_location.
2580
c4bdc42f
MP
25812014-04-30 Marek Polacek <polacek@redhat.com>
2582
2583 PR c/60351
2584 * c-typeck.c (build_binary_op): Use location when warning about
2585 shift count.
2586
45484dcf
MP
25872014-04-25 Marek Polacek <polacek@redhat.com>
2588
2589 PR c/18079
2590 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
2591 always_inline/noinline and hot/cold attributes.
2592
34cf811f
MP
25932014-04-25 Marek Polacek <polacek@redhat.com>
2594
2595 PR c/60114
2596 * c-parser.c (c_parser_initelt): Pass input_location to
2597 process_init_element.
2598 (c_parser_initval): Pass loc to process_init_element.
2599 * c-tree.h (process_init_element): Adjust declaration.
2600 * c-typeck.c (push_init_level): Pass input_location to
2601 process_init_element.
2602 (pop_init_level): Likewise.
2603 (set_designator): Likewise.
2604 (output_init_element): Add location_t parameter. Pass loc to
2605 digest_init.
2606 (output_pending_init_elements): Pass input_location to
2607 output_init_element.
2608 (process_init_element): Add location_t parameter. Pass loc to
2609 output_init_element.
2610
42056eac
JJ
26112014-04-24 Jakub Jelinek <jakub@redhat.com>
2612
2613 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
2614 atomic-clause, allow comma in between atomic-clause and
2615 seq_cst.
2616
e162a134
JJ
26172014-04-22 Jakub Jelinek <jakub@redhat.com>
2618
2619 PR c/59073
2620 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
2621 fails, don't set OM_PARALLEL_COMBINED and return NULL.
2622
2f6babac
IZ
26232014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
2624
2625 PR middle-end/60469
2626 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2627 create_tmp_var instead build_decl for creating temps.
2628 (build_array_notation_expr): Likewise.
2629 (fix_conditional_array_notations_1): Likewise.
2630 (fix_array_notation_expr): Likewise.
2631 (fix_array_notation_call_expr): Likewise.
2632
8edbfaa6
JJ
26332014-03-28 Jakub Jelinek <jakub@redhat.com>
2634
2635 PR c++/60689
2636 * c-tree.h (c_build_function_call_vec): New prototype.
2637 * c-typeck.c (build_function_call_vec): Don't call
2638 resolve_overloaded_builtin here.
2639 (c_build_function_call_vec): New wrapper function around
2640 build_function_call_vec. Call resolve_overloaded_builtin here.
2641 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
2642 Call c_build_function_call_vec instead of build_function_call_vec.
2643 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2644 * c-decl.c (finish_decl): Likewise.
2645
7485aeea
MLI
26462014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2647
2648 PR c/55383
2649 * c-typeck.c: Use correct format string in cast-qual warning
2650
b17a8b07
TS
26512014-03-07 Thomas Schwinge <thomas@codesourcery.com>
2652
2653 * c-decl.c (c_decl_attributes): Use
2654 lang_hooks.types.omp_mappable_type.
2655 * c-typeck.c (c_finish_omp_clauses): Likewise.
2656
3af9c5e9
MP
26572014-03-06 Marek Polacek <polacek@redhat.com>
2658
2659 PR c/60197
2660 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
2661 of checking tree code.
2662
1c9f5f33
PK
26632014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2664
2665 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
2666 (c_parser_parameter_declaration): Likewise.
2667
cc28fc7f
MP
26682014-02-19 Marek Polacek <polacek@redhat.com>
2669
2670 PR c/60195
2671 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
2672 Call mark_exp_read on exp.value.
2673 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
2674 TREE_ADDRESSABLE on old instead of val.
2675 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
2676
b581c05c
PK
26772014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2678
2679 * c-parser.c (c_parser_get_builtin_args): Replace calls to
2680 C_EXPR_APPEND by vec_safe_push.
2681 * c-tree.h (C_EXPR_APPEND): Remove.
2682
81e5eca8
MP
26832014-01-31 Marek Polacek <polacek@redhat.com>
2684
2685 PR c/59963
2686 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
2687 build_function_call_vec.
2688 (build_function_call): Likewise.
2689 (build_atomic_assign): Likewise.
2690 (build_function_call_vec): Add arg_loc parameter. Use it.
2691 (convert_arguments): Likewise.
2692 (convert_for_assignment): Rename rhs_loc to expr_loc.
2693 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
2694 (c_parser_objc_keywordexpr): Likewise.
2695 (c_parser_postfix_expression_after_primary): Call
2696 build_function_call_vec with expr_loc rather than op_loc.
2697 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
2698 build_function_call_vec.
2699 (c_parser_expr_list): Add locations parameter. Fill it with locations
2700 of function arguments.
2701 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
2702
68fca595
MP
27032014-01-30 Marek Polacek <polacek@redhat.com>
2704
2705 PR c/59940
2706 * c-typeck.c (build_function_call_vec): Use loc parameter.
2707 (convert_arguments): Add location parameter. Use it.
2708 (ep_convert_and_check): Likewise.
2709 (build_atomic_assign): Adjust convert_for_assignment call.
2710 (build_modify_expr): Likewise.
2711 (digest_init): Likewise.
2712 (c_finish_return): Likewise.
2713 (build_conditional_expr): Adjust ep_convert_and_check calls.
2714 (convert_for_assignment): Add rhs_loc parameter. Use it.
2715 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
2716 calls.
2717
fa337f3a
RB
27182014-01-30 Richard Biener <rguenther@suse.de>
2719
2720 PR c/59905
2721 * c-typeck.c (build_function_call_vec): Do not replace calls
2722 to a function via an incompatible type with a runtime abort.
2723
b72271b9
BI
27242014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
2725
2726 * c-parser.c (c_parser_declaration_or_fndef): Replaced
2727 flag_enable_cilkplus with flag_cilkplus.
2728 (c_parser_direct_declarator_inner): Likewise.
2729 (c_parser_attribute_any_word): Likewise.
2730 (c_parser_attributes): Likewise.
2731 (c_parser_compound_statement): Likewise.
2732 (c_parser_statement_after_labels): Likewise.
2733 (c_parser_if_statement): Likewise.
2734 (c_parser_switch_statement): Likewise.
2735 (c_parser_do_statement): Likewise.
2736 (c_parser_for_statement): Likewise.
2737 (c_parser_unary_expression): Likewise.
2738 (c_parser_postfix_expression): Likewise.
2739 (c_parser_postfix_expression_after_primary): Likewise.
2740 (c_parser_postfix_expression_after_primary): Likewise.
2741 (c_parser_omp_clause_name): Likewise.
2742 (c_finish_omp_declare_simd): Likewise.
2743 (c_parser_cilk_verify_simd): Likewise.
2744 * c-typeck.c (build_array_ref): Likewise.
2745 (build_function_call_vec): Likewise.
2746 (convert_arguments): Likewise.
2747 (build_compound_expr): Likewise.
2748 (c_finish_return): Likewise.
2749 (c_finish_if_stmt): Likewise.
2750 (c_finish_loop): Likewise.
2751 (build_binary_op): Likewise.
2752
393e8e8b
MP
27532014-01-23 Marek Polacek <polacek@redhat.com>
2754
2755 PR c/59846
2756 * c-typeck.c (parser_build_binary_op): Use location instead of
2757 input_location.
2758 (build_binary_op): Pass location to shorten_compare.
2759
f04dda30
MP
27602014-01-23 Marek Polacek <polacek@redhat.com>
2761
2762 PR c/58346
2763 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
2764 an empty aggregate.
2765
789eadcd
MP
27662014-01-23 Marek Polacek <polacek@redhat.com>
2767
2768 PR c/59871
2769 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
2770 of a comma expression.
2771 (emit_side_effect_warnings): Likewise.
2772
40f14e9f
BI
27732014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2774
2775 PR c/59825
2776 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
2777 function to use walk_tree and moved a lot of its functionality to
2778 expand_array_notations.
2779 (expand_array_notations): New function.
2780
74558dd9
BI
27812014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2782
2783 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
2784 attribute an attribute without value.
2785
652fea39
JJ
27862014-01-23 Jakub Jelinek <jakub@redhat.com>
2787
2788 PR middle-end/58809
2789 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
2790 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
2791
f34f1c87
MP
27922014-01-22 Marek Polacek <polacek@redhat.com>
2793
2794 PR c/59891
2795 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
2796 of remove_c_maybe_const_expr on op1 and op2.
2797
241f845a
JJ
27982014-01-15 Jakub Jelinek <jakub@redhat.com>
2799
2800 PR c/58943
2801 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
2802 effects, preevaluate rhs using SAVE_EXPR first.
2803
9a74f20c
BI
28042014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
2805
2806 PR c++/59631
2807 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
2808 statements with if-elseif statements.
2809
96066ce1
MP
28102014-01-06 Marek Polacek <polacek@redhat.com>
2811
2812 PR c/57773
2813 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
2814 defined bit-field types only in ISO C.
2815
23a5b65a
RS
28162014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2817
2818 Update copyright years
2819
f9030485
RS
28202014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2821
2822 * c-array-notation.c: Use the standard form for the copyright notice.
2823
41958c28
BI
28242013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
2825
2826 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
2827 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
2828 field in parser is not empty. If not-empty, call the function
2829 c_parser_finish_omp_declare_simd.
2830 (c_parser_cilk_clause_vectorlength): Modified function to be shared
2831 between SIMD-enabled functions and #pragma simd. Added new parameter.
2832 (c_parser_cilk_all_clauses): Modified the usage of the function
2833 c_parser_cilk_clause_vectorlength as mentioned above.
2834 (c_parser_cilk_simd_fn_vector_attrs): New function.
2835 (c_finish_cilk_simd_fn_tokens): Likewise.
2836 (is_cilkplus_vector_p): Likewise.
2837 (c_parser_omp_clause_name): Added checking for "vectorlength,"
2838 "nomask," and "mask" strings in clause name.
2839 (c_parser_omp_all_clauses): Added 3 new case statements:
2840 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
2841 PRAGMA_CILK_CLAUSE_NOMASK.
2842 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
2843 check for vector attribute and if so call the function
2844 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
2845 called the function c_finish_cilk_simd_fn_tokens.
2846 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
2847 parser field is non-empty. If so, parse them as you would parse
2848 the omp declare simd pragma.
2849 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
2850 Added a check when step is a parameter and flag it as error.
2851 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
2852 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
2853 pragma_omp_clause.
2854
cef0fd0e
TS
28552013-12-17 Thomas Schwinge <thomas@codesourcery.com>
2856
2857 * c-parser.c (c_parser_omp_parallel): Fix description.
2858
12893402
BI
28592013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
2860
2861 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
2862 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
2863 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
2864 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
2865
296674db
JM
28662013-12-04 Joseph Myers <joseph@codesourcery.com>
2867
2868 PR c/52023
2869 * c-parser.c (c_parser_alignas_specifier): Use
2870 c_sizeof_or_alignof_type instead of c_alignof.
2871 (c_parser_alignof_expression): Likewise, with min_alignof
2872 parameter depending on alignof spelling used.
2873
edd28054
MP
28742013-12-04 Marek Polacek <polacek@redhat.com>
2875
2876 PR c/54113
2877 * c-decl.c (start_function): Don't warn for missing prototype for
2878 inline functions.
2879
da0fc454
MP
28802013-12-03 Marek Polacek <polacek@redhat.com>
2881
2882 PR c/59351
2883 * c-decl.c (build_compound_literal): Allow compound literals with
2884 empty initial value.
2885
4c2ecab0
JM
28862013-12-02 Joseph Myers <joseph@codesourcery.com>
2887
2888 PR c/58235
2889 * c-typeck.c (build_modify_expr): Diagnose assignment to
2890 expression with array type.
2891
340baef7
JM
28922013-11-29 Joseph Myers <joseph@codesourcery.com>
2893
2894 PR c/42262
2895 * c-typeck.c (process_init_element): Do not treat a string as
2896 initializing a whole array when used with a designator for an
2897 individual element.
2898
6763b9f7
JM
28992013-11-29 Joseph Myers <joseph@codesourcery.com>
2900
2901 PR c/57574
2902 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
2903 an inline function following a static declaration.
2904
e7bd1de1
JJ
29052013-11-28 Jakub Jelinek <jakub@redhat.com>
2906
2907 PR c/59310
2908 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
2909 to p_name before calling c_parser_omp_teams instead of after.
2910 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
2911 argument. Remove unused p_name variable.
2912
0136f8f0
AH
29132013-11-27 Aldy Hernandez <aldyh@redhat.com>
2914 Jakub Jelinek <jakub@redhat.com>
2915
2916 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
2917 external_scope is NULL.
2918
241b71bb
TV
29192013-11-27 Tom de Vries <tom@codesourcery.com>
2920 Marc Glisse <marc.glisse@inria.fr>
2921
2922 PR c++/59032
2923 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
2924
2fb9a547
AM
29252013-11-22 Andrew MacLeod <amacleod@redhat.com>
2926
2927 * c-typeck.c: Add required include files from gimple.h.
2928
8400e75e
DM
29292013-11-22 David Malcolm <dmalcolm@redhat.com>
2930
2931 * c-decl.c (define_label, shadow_tag_warned)
2932 (check_bitfield_type_and_width, grokdeclarator, grokparms,
2933 store_parm_decls_newstyle, store_parm_decls_oldstyle)
2934 (declspecs_add_type): Remove use of in_system_header macro.
2935 * c-parser.c (c_parser_unary_expression): Likewise.
2936 * c-typeck.c (store_init_value, process_init_element)
2937 (c_start_case): Likewise.
2938
2939 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
2940 macro.
2941
2942 * c-parser.c (c_parser_set_source_position_from_token): Remove
2943 reference to in_system_header from comment.
2944
386b1f1f
RS
29452013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2946
2947 * c-decl.c (grokdeclarator): Update comment to refer to
2948 tree_to_[su]hwi rather than tree_low_cst.
2949
ae7e9ddd
RS
29502013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2951
2952 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
2953 tree_to_uhwi throughout.
2954
9439e9a1
RS
29552013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2956
2957 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
2958 throughout.
2959
9541ffee
RS
29602013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2961
2962 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
2963 throughout.
2964
c02065fc
AH
29652013-11-15 Aldy Hernandez <aldyh@redhat.com>
2966
2967 * c-parser.c (c_parser_cilk_simd): New.
2968 (c_parser_cilk_verify_simd): New.
2969 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
2970 (c_parser_omp_for_loop): Add case for NE_EXPR.
2971 Set c_break_label for CILK_SIMD.
2972 (c_parser_cilk_clause_vectorlength): New.
2973 (c_parser_cilk_clause_linear): New.
2974 (c_parser_cilk_clause_name): New.
2975 (c_parser_cilk_all_clauses): New.
2976 * c-typeck.c (build_unary_op): Pass location argument to
2977 readonly_error.
2978 (build_modify_expr): Same.
2979 (build_asm_expr): Same.
2980 (c_finish_bc_stmt): Error on break/continue in loops.
2981
18f429e2
AM
29822013-11-14 Andrew MacLeod <amacleod@redhat.com>
2983
2984 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
2985
d8a2d370
DN
29862013-11-14 Diego Novillo <dnovillo@google.com>
2987
2988 * c-decl.c: Include print-tree.h.
2989 Include stor-layout.h.
2990 Include varasm.h.
2991 Include attribs.h.
2992 Include stringpool.h.
2993 * c-lang.c: Include fold-const.h.
2994 * c-parser.c: Include stringpool.h.
2995 Include attribs.h.
2996 Include stor-layout.h.
2997 Include varasm.h.
2998 Include trans-mem.h.
2999 * c-typeck.c: Include stor-layout.h.
3000 Include trans-mem.h.
3001 Include varasm.h.
3002 Include stmt.h.
3003
38b7bc7f
JM
30042013-11-13 Joseph Myers <joseph@codesourcery.com>
3005
3006 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
3007 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
3008 __auto_type.
3009 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
3010 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
3011 RID_AUTO_TYPE.
3012 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
3013 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
3014 (c_parser_declarator, c_parser_direct_declarator_inner)
3015 (c_parser_parameter_declaration, c_parser_type_name): All callers
3016 changed.
3017 (c_parser_declaration_or_fndef): Handle declarations with type
3018 determined from the initializer.
3019
45b0be94
AM
30202013-11-12 Andrew MacLeod <amacleod@redhat.com>
3021
18f429e2 3022 * c-typeck.c: Include gimplify.h.
45b0be94 3023
582d9b50
JM
30242013-11-12 Joseph Myers <joseph@codesourcery.com>
3025
3026 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
3027 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
3028 comment.
3029 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
3030 or _Thread_local as appropriate in diagnostics.
3031 (build_null_declspecs): Initialize ret->thread_gnu_p.
3032 (declspecs_add_scspec): Handle either __thread or _Thread_local
3033 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
3034 pedantic. Do not disallow _Thread_local extern and _Thread_local
3035 static.
3036
267bac10
JM
30372013-11-07 Joseph Myers <joseph@codesourcery.com>
3038 Andrew MacLeod <amacleod@redhat.com>
3039
3040 * c-aux-info.c (gen_type): Handle atomic qualifier.
3041 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
3042 qualifiers when compating types.
3043 (shadow_tag_warned): Handle atomic_p in declspecs.
3044 (quals_from_declspecs): Likewise.
3045 (start_decl): Use c_type_promotes_to when promoting argument
3046 types.
3047 (grokdeclarator): Handle _Atomic.
3048 (get_parm_info): Diagnose any qualifier on "void" as only
3049 parameter.
3050 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
3051 comparing types. Use c_type_promotes_to when promoting argument
3052 types.
3053 (finish_function): Use c_type_promotes_to when promoting argument
3054 types.
3055 (build_null_declspecs): Handle atomic_p in declspecs.
3056 (declspecs_add_qual): Handle RID_ATOMIC.
3057 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
3058 (c_token_starts_declspecs): Handle RID_ATOMIC.
3059 (c_parser_declspecs): Handle atomic type specifiers and
3060 qualifiers.
3061 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
3062 from types of expressions with atomic type.
3063 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
3064 (c_parser_attribute_any_word): Handle RID_ATOMIC.
3065 (c_parser_initializer, c_parser_initelt, c_parser_initval)
3066 (c_parser_statement_after_labels, c_parser_switch_statement)
3067 (c_parser_for_statement, c_parser_expr_no_commas)
3068 (c_parser_conditional_expression, c_parser_binary_expression)
3069 (c_parser_cast_expression, c_parser_unary_expression)
3070 (c_parser_postfix_expression)
3071 (c_parser_postfix_expression_after_primary, c_parser_expression):
3072 Use convert_lvalue_to_rvalue.
3073 (c_parser_expression_conv, c_parser_expr_list): Document
3074 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
3075 (c_parser_objc_synchronized_statement): Use
3076 convert_lvalue_to_rvalue.
3077 (c_parser_objc_selector): Handle RID_ATOMIC.
3078 (c_parser_objc_receiver, c_parser_array_notation): Use
3079 convert_lvalue_to_rvalue.
3080 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
3081 _Atomic (type-name).
3082 (struct c_declspecs): Add atomic_p field.
3083 (convert_lvalue_to_rvalue): Declare.
3084 * c-typeck.c (c_type_promotes_to): Promote atomic types to
3085 corresponding atomic types.
3086 (qualify_type): Don't add _Atomic qualifiers from second argument.
3087 (comp_target_types): Do not allow _Atomic mismatches.
3088 (type_lists_compatible_p): Do not remove atomic qualifiers when
3089 comparing types.
3090 (really_atomic_lvalue, convert_lvalue_to_rvalue)
3091 (build_atomic_assign): New functions.
3092 (build_unary_op): Use build_atomic_assign for atomic increment and
3093 decrement.
3094 (build_conditional_expr): Do not treat _Atomic void as a qualified
3095 version of void.
3096 (build_modify_expr): Use build_atomic_assign for atomic LHS.
3097 (find_anonymous_field_with_type, convert_to_anonymous_field)
3098 (convert_for_assignment): Do not remove atomic qualifiers when
3099 comparing types.
3100 (digest_init): Do not accept initialization of arrays of atomic
3101 elements by string constants.
3102 (build_asm_expr): Use convert_lvalue_to_rvalue.
3103 (build_binary_op): Do not treat _Atomic void as a qualified
3104 version of void.
3105
0c249d4b
DD
31062013-11-06 DJ Delorie <dj@redhat.com>
3107
3108 * c-decl.c (locate_old_decl): If a previous conflicting decl is
3109 both explicit and builtin, print the location of the explicit one.
3110
6d7f7e0a
TB
31112013-11-05 Tobias Burnus <burnus@net-b.de>
3112
3113 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
3114 c_parser_omp_distribute, c_parser_omp_teams,
3115 c_parser_omp_target, c_parser_omp_declare): Handle
3116 -fopenmp-simd.
3117
b906f4ca
MP
31182013-11-03 Marek Polacek <polacek@redhat.com>
3119
3120 * c-decl.c (grokdeclarator): Add VLA instrumentation.
3121
ee1d5a02
JJ
31222013-11-01 Jakub Jelinek <jakub@redhat.com>
3123
3124 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
3125 check_dup_generic at the end, unless remove is true.
3126 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
3127 remove = true;.
3128 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
3129
5a9785fb
JJ
31302013-10-31 Jakub Jelinek <jakub@redhat.com>
3131
3132 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
3133 with decl that is not pointer nor array.
3134
939b37da
BI
31352013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
3136
3137 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
3138 a spawning function is found.
3139 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
3140 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
3141 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3142 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
3143 case.
3144 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
3145 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
3146 expr.
3147 (c_finish_return): Added a check to reject _Cilk_spawn in return
3148 expression.
3149 (build_cilk_spawn): New function.
3150 (build_cilk_sync): Likewise.
3151 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
3152
d4af74d4
TB
31532013-10-27 Tobias Burnus <burnus@net-b.de>
3154
3155 PR other/33426
3156 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
3157 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
3158 (c_parser_statement_after_labels): Update calls.
3159
d73749df 31602013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
3161
3162 PR other/33426
3163 * c-parser.c (c_parser_pragma, c_parser_for_statement):
3164 Handle PRAGMA_IVDEP.
3165 (c_parser_statement_after_labels): Update call.
3166
f28aa681
MP
31672013-10-24 Marek Polacek <polacek@redhat.com>
3168
3169 * c-parser.c (c_parser_struct_declaration): Add a comment.
3170 (c_parser_declarator): Don't allow _Alignas here.
3171
0645c1a2
AM
31722013-10-17 Andrew MacLeod <amacleod@redhat.com>
3173
3174 * c-parser.c: Include omp-low.h.
3175 * c-typeck.c: Likewise.
3176
568a31f2
MP
31772013-10-17 Marek Polacek <polacek@redhat.com>
3178
3179 PR c/58267
3180 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
3181 Document syntax of the array-declarator.
3182 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
3183 are not permitted.
3184 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
3185 (c_parser_struct_declaration): Likewise.
3186 (c_parser_declarator): Likewise.
3187 (c_parser_direct_declarator_inner): Likewise.
3188 (c_parser_parameter_declaration): Likewise.
3189 (c_parser_type_name): Likewise.
3190
acf0174b
JJ
31912013-10-11 Jakub Jelinek <jakub@redhat.com>
3192
3193 * c-lang.h (current_omp_declare_target_attribute): New extern
3194 decl.
3195 * c-parser.c: Include c-lang.h.
3196 (struct c_parser): Change tokens to c_token *.
3197 Add tokens_buf field. Change tokens_avail type to unsigned int.
3198 (c_parser_consume_token): If parser->tokens isn't
3199 &parser->tokens_buf[0], increment parser->tokens.
3200 (c_parser_consume_pragma): Likewise.
3201 (enum pragma_context): Add pragma_struct and pragma_param.
3202 (c_parser_external_declaration): Adjust
3203 c_parser_declaration_or_fndef caller.
3204 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
3205 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
3206 Adjust recursive call.
3207 (c_parser_struct_or_union_specifier): Use pragma_struct instead
3208 of pragma_external.
3209 (c_parser_parameter_declaration): Use pragma_param instead of
3210 pragma_external.
3211 (c_parser_compound_statement_nostart, c_parser_label,
3212 c_parser_for_statement): Adjust
3213 c_parser_declaration_or_fndef callers.
3214 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
3215 it through to c_parser_conditional_expression.
3216 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
3217 pass it through to c_parser_binary_expression. Adjust recursive
3218 call.
3219 (c_parser_binary_expression): Remove prec argument, add
3220 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
3221 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
3222 binop matches it, use build2 instead of parser_build_binary_op.
3223 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
3224 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
3225 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
3226 Handle pragma_struct and pragma_param the same as pragma_external.
3227 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
3228 (c_parser_omp_variable_list): Parse array sections for
3229 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
3230 (c_parser_omp_clause_collapse): Fully fold collapse expression.
3231 (c_parser_omp_clause_reduction): Handle user defined reductions.
3232 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
3233 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
3234 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
3235 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
3236 c_parser_omp_clause_depend, c_parser_omp_clause_map,
3237 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
3238 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
3239 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
3240 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
3241 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
3242 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
3243 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
3244 (c_parser_omp_for_loop): Add CODE argument, pass it through
3245 to c_finish_omp_for. Change last argument to cclauses,
3246 and adjust uses to grab parallel clauses from the array of all
3247 the split clauses. Adjust c_parser_binary_expression,
3248 c_parser_declaration_or_fndef and c_finish_omp_for callers.
3249 (omp_split_clauses): New function.
3250 (c_parser_omp_simd): New function.
3251 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
3252 Allow the function to be called also when parsing combined constructs,
3253 and call c_parser_omp_simd when parsing for simd.
3254 (c_parser_omp_sections_scope): If section-sequence doesn't start with
3255 #pragma omp section, require exactly one structured-block instead of
3256 sequence of statements.
3257 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
3258 Allow the function to be called also when parsing combined constructs.
3259 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
3260 Allow the function to be called also when parsing combined
3261 constructs.
3262 (c_parser_omp_taskgroup, c_parser_omp_cancel,
3263 c_parser_omp_cancellation_point, c_parser_omp_distribute,
3264 c_parser_omp_teams, c_parser_omp_target_data,
3265 c_parser_omp_target_update, c_parser_omp_target,
3266 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
3267 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
3268 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
3269 (c_parser_omp_construct): Add p_name and mask vars. Handle
3270 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
3271 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
3272 and c_parser_omp_sections callers.
3273 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
3274 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
3275 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
3276 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
3277 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
3278 OMP_CLAUSE_DEPEND.
3279 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
3280 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
3281 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
3282 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
3283 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
3284 * c-typeck.c: Include tree-inline.h.
3285 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
3286 handle_omp_array_sections_1, handle_omp_array_sections,
3287 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
3288 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
3289 user defined reductions.
3290 (c_tree_equal): New function.
3291 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
3292 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
3293 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
3294 c_check_omp_declare_reduction_r): New prototypes.
3295 * c-decl.c (current_omp_declare_target_attribute): New variable.
3296 (c_decl_attributes): New function.
3297 (start_decl, start_function): Use it instead of decl_attributes.
3298 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
3299 c_omp_reduction_decl, c_omp_reduction_lookup,
3300 c_check_omp_declare_reduction_r): New functions.
3301
0a6c2227
TT
33022013-09-25 Tom Tromey <tromey@redhat.com>
3303
3304 * Make-lang.in (c/gccspec.o): Remove.
3305 (CFLAGS-c/gccspec.o): New variable.
3306 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
3307 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
3308 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
3309
f3bc55f0
TT
33102013-09-25 Tom Tromey <tromey@redhat.com>
3311
3312 * Make-lang.in (c/gccspec.o): Don't use subshell.
3313
a24d975c
MP
33142013-09-18 Marek Polacek <polacek@redhat.com>
3315
3316 PR sanitize/58443
3317 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
3318 Remove unnecessary check.
3319
ce6923c5
MP
33202013-09-18 Marek Polacek <polacek@redhat.com>
3321
3322 PR sanitizer/58411
3323 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
3324 no_sanitize_undefined attribute.
3325
a1e51df9
KT
33262013-09-13 Kai Tietz <ktietz@redhat.com>
3327
3328 PR target/57848
3329 * c-decl.c (c_builtin_function_ext_scope): Remove
3330 wrong assumption that it is never called on prexisting
3331 symbol.
3332
0af94e6f
JR
33332013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
3334
3335 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
3336
20059c8b
GDR
33372013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3338
3339 * c-objc-common.c (c_tree_printer): Tidy.
3340
de5a5fa1
MP
33412013-08-30 Marek Polacek <polacek@redhat.com>
3342
3343 * c-typeck.c (build_binary_op): Add division by zero and shift
3344 instrumentation.
3345
2531a1d9 33462013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 3347 Joseph Myers <joseph@codesourcery.com>
2531a1d9 3348
6e2bcc98 3349 PR c/35649
2531a1d9
JR
3350 * c-typeck.c (c_common_type): Prefer double_type_node over
3351 other REAL_TYPE types with the same precision.
3352 (convert_arguments): Likewise.
3353
025311c4
GDR
33542013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
3355
3356 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
3357 (c_initialize_diagnostics): Call a destructor for the early printer.
3358
da6ca2b5
GDR
33592013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
3360
3361 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
3362 printer initialization.
3363
318cda85 33642013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 3365
318cda85
BI
3366 PR c/57490
3367 * c-array-notation.c (fix_conditional_array_notations_1): Added a
3368 check for truth values.
3369 (expand_array_notation_exprs): Added truth values case. Removed an
3370 unwanted else. Added for-loop to walk through subtrees in default
3371 case.
3372
b066401f
GDR
33732013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3374
3375 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
3376
fb48aadc
JM
33772013-07-23 Joseph Myers <joseph@codesourcery.com>
3378
3379 * c-parser.c (struct c_generic_association): Fix typo.
3380
433cc7b0
TT
33812013-07-23 Tom Tromey <tromey@redhat.com>
3382 Joseph Myers <joseph@codesourcery.com>
3383
3384 * c-parser.c (struct c_generic_association): New.
3385 (c_generic_association_d): New typedef.
3386 (c_parser_generic_selection): New function.
3387 (c_parser_postfix_expression): Handle RID_GENERIC.
3388
26d40c3d
JM
33892013-07-13 Jason Merrill <jason@redhat.com>
3390
3391 PR c++/57793
3392 * c-decl.c (finish_struct): Check for too-large class.
3393
ecdbd01a 33942013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
3395
3396 PR c/57821
3397 * c-typeck.c (set_init_index): When folding, check for index overflow.
3398
1141ed3f
BI
33992013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3400
3401 * c-parser.c (c_parser_array_notation): Removed rejection of array
3402 notations in an array of function pointers.
3403
713b46fa
BI
34042013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
3405
3406 * c-array-notation.c (make_triplet_val_inv): New function.
3407 (create_cmp_incr): Likewise.
3408 (create_array_refs): Likewise.
3409 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
3410 Also modularized common parts between functions and called the function.
3411 (build_array_notation_expr): Likewise.
3412 (fix_conditional_array_notations_1): Likewise.
3413 (fix_array_notation_expr): Likewise.
3414 (fix_array_notation_call_expr): Likewise.
3415
92f20202
MP
34162013-06-18 Marek Polacek <polacek@redhat.com>
3417
3418 PR c/57630
3419 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
3420
73a23b06
BI
34212013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
3422
3423 * c-array-notation.c (build_array_notation_expr): Reject array notation
3424 mismatch between LHS and RHS even inside a call_expr. Also, removed
3425 a couple while statements that were dead code.
3426
00b8517d
BI
34272013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
3428
3429 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
3430 excessive precision expressions in function parameters. Also removed
3431 couple unwanted while statements.
3432
1509bdda
BI
34332013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3434
3435 * c-array-notation.c (expand_array_notation_exprs): Added
3436 ARRAY_NOTATION_REF case.
3437
d60f1706
BI
34382013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3439
3440 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
3441 function to c-family/array-notation-common.c.
3442 (is_cilkplus_reduce_builtin): Likewise.
3443 (find_rank): Likewise.
3444 (extract_array_notation_exprs): Likewise.
3445 (replace_array_notations): Likewise.
3446 (find_inv_trees): Likewise.
3447 (replace_inv_trees): Likewise.
3448 (contains_array_notation_expr): Likewise.
3449 (find_correct_array_notation_type): Likewise.
3450 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
3451 (struct inv_list): Moved this to c-family/array-notation-common.c.
3452 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
3453
6d6efbb3
BI
34542013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
3455
3456 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
3457 reduction functions outside the for-loop. Added a check if the fundecl
3458 is non-NULL. Finally, removed an unwanted if-statement, and made the
3459 body unconditional.
3460
25c22937
BI
34612013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3462
3463 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
3464 condition of the if-statement matches the rank of else-block and then-
3465 block when array notations are used.
3466 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
3467 expression after the entire function body is parsed.
3468 (c_parser_expr_no_commas): Delayed creating array notation expressions
3469 to the end of function parsing.
3470 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
3471 whole if-statement instead of just the condition.
3472 (expand_array_notation_exprs): Added MODIFY_EXPR case.
3473
edd25645
BI
34742013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3475
3476 PR c/57474
3477 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
3478 array to NULL_TREE if they are unused. Also added a check for the
3479 field to be NULL before its fields are used in future.
3480
065ce7f1
RO
34812013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3482
3483 PR bootstrap/57450
3484 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
3485 (build_array_notation_expr): Likewise.
3486
36536d79
BI
34872013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3488
3489 * c-typeck.c (build_array_ref): Added a check to see if array's
3490 index is greater than one. If true, then emit an error.
3491 (build_function_call_vec): Exclude error reporting and checking
3492 for builtin array-notation functions.
3493 (convert_arguments): Likewise.
3494 (c_finish_return): Added a check for array notations as a return
3495 expression. If true, then emit an error.
3496 (c_finish_loop): Added a check for array notations in a loop
3497 condition. If true then emit an error.
3498 (lvalue_p): Added a ARRAY_NOTATION_REF case.
3499 (build_binary_op): Added a check for array notation expr inside
3500 op1 and op0. If present, we call another function to find correct
3501 type.
3502 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
3503 * c-parser.c (c_parser_compound_statement): Check if array
3504 notation code is used in tree, if so, then transform them into
3505 appropriate C code.
3506 (c_parser_expr_no_commas): Check if array notation is used in LHS
3507 or RHS, if so, then build array notation expression instead of
3508 regular modify.
3509 (c_parser_postfix_expression_after_primary): Added a check for
3510 colon(s) after square braces, if so then handle it like an array
3511 notation. Also, break up array notations in unary op if found.
3512 (c_parser_direct_declarator_inner): Added a check for array
3513 notation.
3514 (c_parser_compound_statement): Added a check for array notation in
3515 a stmt. If one is present, then expand array notation expr.
3516 (c_parser_if_statement): Likewise.
3517 (c_parser_switch_statement): Added a check for array notations in
3518 a switch statement's condition. If true, then output an error.
3519 (c_parser_while_statement): Similarly, but for a while.
3520 (c_parser_do_statement): Similarly, but for a do-while.
3521 (c_parser_for_statement): Similarly, but for a for-loop.
3522 (c_parser_unary_expression): Check if array notation is used in a
3523 pre-increment or pre-decrement expression. If true, then expand
3524 them.
3525 (c_parser_array_notation): New function.
3526 * c-array-notation.c: New file.
3527 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
3528
cd192ccc
MS
35292013-05-23 Mike Stump <mikestump@comcast.net>
3530
3531 * c-typeck.c (convert_for_assignment): Handle references to memory
3532 spaces better.
3533
427b248d
JM
35342013-05-16 Jason Merrill <jason@redhat.com>
3535
3536 * Make-lang.in (cc1$(exeext)): Use link mutex.
3537
44d90fe1
PC
35382013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
3539
3540 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
3541 to simply use OPT_Wpointer_arith.
3542 (build_unary_op): Likewise.
3543
4e7d7b3d
JJ
35442013-04-03 Jakub Jelinek <jakub@redhat.com>
3545
3546 PR c/19449
3547 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
3548 argument. If set, or it temporarily for parsing of the first
3549 argument into force_folding_builtin_constant_p.
3550 (c_parser_postfix_expression): Adjust callers.
3551
839b422f
RB
35522013-03-21 Richard Biener <rguenther@suse.de>
3553
3554 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
3555 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
3556
2ee028f1
MP
35572013-02-12 Marek Polacek <polacek@redhat.com>
3558
3559 PR c/44938
3560 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
3561 origtypes to NULL.
3562
8824edff
JJ
35632013-01-24 Jakub Jelinek <jakub@redhat.com>
3564
3565 PR c/56078
3566 * c-typeck.c (set_nonincremental_init_from_string): If
3567 constructor_max_index is NULL, treat it as if tree_int_cst_lt
3568 returned false.
3569 (process_init_element): Likewise.
3570
eadd3d0d
JJ
35712012-12-20 Jakub Jelinek <jakub@redhat.com>
3572
3573 PR c++/55619
3574 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
3575 argument, don't call default_function_array_conversion
3576 nor c_fully_fold here.
3577 (c_parser_asm_statement): Adjust callers.
3578 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
3579 and outputs here, and call default_function_array_conversion
3580 on inputs that don't need to be addressable.
3581
f8a93a2e
JJ
35822012-12-18 Jakub Jelinek <jakub@redhat.com>
3583
3584 PR c/39464
3585 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
3586 warning require that both c_common_unsigned_type as well as
3587 c_common_signed_type is the same for both mvl and mvr types.
3588
9771b263
DN
35892012-11-16 Diego Novillo <dnovillo@google.com>
3590
3591 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
3592
3593 * c-common.c: Use new vec API in vec.h.
3594 * c-common.h: Likewise.
3595 * c-gimplify.c: Likewise.
3596 * c-pragma.c: Likewise.
3597 * c-pretty-print.c: Likewise.
3598 * c-pretty-print.h: Likewise.
3599 * c-semantics.c: Likewise.
3600 * c-decl.c: Likewise.
3601 * c-parser.c: Likewise.
3602 * c-tree.h: Likewise.
3603 * c-typeck.c: Likewise.
3604
880661a4
JW
36052012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
3606
3607 PR c++/54930
3608 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
3609
077d1abe
MLI
36102012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3611
3612 PR c/53066
3613 * c-decl.c (warn_if_shadowing): Do not warn if a variable
3614 shadows a function, unless the variable is a function or a
3615 pointer-to-function.
3616
3a785c97
JJ
36172012-10-12 Jakub Jelinek <jakub@redhat.com>
3618
3619 PR c/54381
3620 * c-parser.c (struct c_tree_loc_pair): Removed.
3621 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
3622 add location_t * and tree * arguments, fill in array of 3
3623 sizeof_arg trees and corresponding locs.
3624 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
3625 c_parser_expr_list callers.
3626 (c_parser_postfix_expression_after_primary): Likewise. Pass
3627 array of 3 sizeof_arg trees and locs (corresponding to first
3628 3 arguments) to sizeof_pointer_memaccess_warning.
3629
703c8606
LC
36302012-10-09 Lawrence Crowl <crowl@google.com>
3631
3632 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
3633 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
3634 hash table.
3635
5d9de0d0
PC
36362012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
3637
3638 PR c++/54194
3639 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
3640 call.
3641
a212e43f
MG
36422012-10-09 Marc Glisse <marc.glisse@inria.fr>
3643
3644 PR c++/54427
3645 * c-typeck.c: Include c-common.h.
3646 (enum stv_conv): Moved to c-common.h.
3647 (scalar_to_vector): Moved to c-common.c.
3648 (build_binary_op): Adapt to scalar_to_vector's new prototype.
3649 * Make-lang.in: c-typeck.c depends on c-common.h.
3650
3b78de56
AC
36512012-10-04 Arnaud Charlet <charlet@adacore.com>
3652
3653 * c-decl.c (c_write_global_declarations): Fix handling of
3654 -fdump-ada-spec*.
3655
78c60e3d
SS
36562012-09-30 Sharad Singhai <singhai@google.com>
3657
3658 * c-decl.c (c_write_global_declarations): Use a different method
3659 to determine if the dump has ben initialized.
3660
9f33203d
JM
36612012-09-14 Joseph Myers <joseph@codesourcery.com>
3662
3663 PR c/54552
3664 * c-typeck.c (c_cast_expr): When casting to a type requiring
3665 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
3666 c_fully_fold first.
3667
a27d595d
JM
36682012-09-14 Joseph Myers <joseph@codesourcery.com>
3669
3670 PR c/54103
3671 * c-typeck.c (build_unary_op): Pass original argument of
3672 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
3673 any C_MAYBE_CONST_EXPR, if it has integer operands.
3674 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
3675 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
3676 to c_objc_common_truthvalue_conversion, then remove any
3677 C_MAYBE_CONST_EXPR, if they have integer operands. Use
3678 c_objc_common_truthvalue_conversion not
3679 c_common_truthvalue_conversion.
3680 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
3681 call note_integer_operands for arguments with integer operands
3682 that are not integer constants.
3683
9feb29df
JJ
36842012-09-13 Jakub Jelinek <jakub@redhat.com>
3685
3686 PR c/54559
3687 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
3688 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
3689
d409320c
JJ
36902012-08-31 Jakub Jelinek <jakub@redhat.com>
3691
3692 PR c/54428
3693 * c-convert.c (convert): Don't call fold_convert_loc if
3694 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
3695 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
3696 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
3697
6265d07c
JJ
36982012-08-24 Jakub Jelinek <jakub@redhat.com>
3699
3700 PR c/54355
3701 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
3702 for nested and empty_ok arguments in the call to
3703 c_parser_declaration_or_fndef.
3704
1a4049e7
JJ
37052012-08-17 Jakub Jelinek <jakub@redhat.com>
3706
3707 * c-tree.h (c_last_sizeof_arg): Declare.
3708 * c-parser.c (struct c_tree_loc_pair): New type.
3709 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
3710 non-NULL.
3711 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
3712 (c_parser_postfix_expression_after_primary): Likewise. Call
3713 sizeof_pointer_memaccess_warning if needed.
3714 (sizeof_ptr_memacc_comptypes): New function.
3715 * c-typeck.c (c_last_sizeof_arg): New global variable.
3716 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
3717
0229aee9
UB
37182012-07-24 Uros Bizjak <ubizjak@gmail.com>
3719
3720 * c-lang.h (lang_decl): Add variable_size GTY option.
3721
7ee2468b
SB
37222012-07-16 Steven Bosscher <steven@gcc.gnu.org>
3723
3724 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
3725 * Make-lang.in: Fix dependencies.
3726
d4a10d0a
SB
37272012-06-29 Steven Bosscher <steven@gcc.gnu.org>
3728
3729 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
3730 and add language Makefile hooks.
3731 * config-lang.in: New file.
3732 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
3733 add the required "normal" config-lang.in rules.
3734 * c-lang.h: Moved from gcc/ to here.
3735 * c-tree.h: Likewise.
3736 * c-objc-common.c: Likewise.
3737 * c-objc-common.h: Likewise.
3738 * c-typeck.c: Likewise.
3739 * c-convert.c: Likewise.
3740 * c-lang.c: Likewise.
3741 * c-aux-info.c: Likewise.
3742 * c-errors.c: Likewise.
3743 * gccspec.c: Likewise.
3744 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
3745 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
3746\f
818ab71a 3747Copyright (C) 2012-2016 Free Software Foundation, Inc.
d4a10d0a
SB
3748
3749Copying and distribution of this file, with or without modification,
3750are permitted in any medium without royalty provided the copyright
3751notice and this notice are preserved.
This page took 1.426709 seconds and 5 git commands to generate.